T09 · Insecure Skill Coding Practices
- Location
fix_manifest_and_compression.sh:9- Finding
Hard-Coded APK Signing Credentials Exposed in Script and Process Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This APK repair skill has a coherent purpose, but it needs Review because it rewrites, signs, and sideloads APKs with hard-coded signing details and weak safeguards.
Install only if you understand APK rebuilding and signing. Use a disposable test device, keep a backup of the original APK, replace the hard-coded signing material with your own protected debug key, verify the package name and certificate before installing, and disable unknown-source installation afterward.
fix_manifest_and_compression.sh:9Hard-Coded APK Signing Credentials Exposed in Script and Process Arguments
fix_manifest_and_compression.sh:7Predictable Shared Temporary Paths Permit Artifact Substitution and Disclosure
fix_manifest_and_compression.sh:31Malformed-Manifest Recovery Silently Replaces Application Identity with Hard-Coded Metadata
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
unzip -q /tmp/temp_universal_signed.apk -d "$TEMP_DIR"
# 解压缩 resources.arsc 文件
rm -f "$TEMP_DIR/resources.arsc"
unzip -p /tmp/temp_universal_signed.apk resources.arsc > "$TEMP_DIR/resources.arsc"
# 重新打包 APK,确保 resources.arsc 文件未压缩
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
unzip -q /tmp/temp_universal_signed.apk -d "$TEMP_DIR"
# 解压缩 resources.arsc 文件
rm -f "$TEMP_DIR/resources.arsc"
unzip -p /tmp/temp_universal_signed.apk resources.arsc > "$TEMP_DIR/resources.arsc"
# 重新打包 APK,确保 resources.arsc 文件未压缩
The skill explicitly instructs users to enable installation from unknown sources and install a modified APK, but it does not include safety guidance about trust, provenance, or the risk of sideloading tampered applications. In this context, the omission is meaningful because the skill is about repackaging and re-signing an APK, which materially increases the chance that users install software outside normal platform protections.
The script hardcodes keystore location, alias, and passwords directly in source, which exposes signing credentials to anyone who can read the file or logs. Even though the values appear to be a temporary/debug keystore, embedding credentials in plaintext normalizes unsafe handling of signing secrets and can enable unauthorized APK signing if the keystore file is accessible.
The script overwrites the original APK in place during rezipping and signing without backup, confirmation, or atomic safety checks. This can permanently destroy the only copy of the artifact or replace it with a partially processed/corrupted APK if any intermediate step fails.
The file forces a specific language for all instructions and warnings, which can violate language/locale policy when no user opt-in or alternative is provided. There is no indication that the skill is intentionally region-specific or that users may choose another language.
The script's comments and user-visible echo messages are written exclusively in Chinese, which imposes a specific language on users without offering any locale or language choice. This is a natural-language policy concern because the file does not indicate that the script is region-specific or provide opt-in for the language.