Agent-skills-standard android-security
Secure Data Encryption, Network Security, and Permissions on Android. Use when handling API keys, auth tokens, cleartext traffic, android:exported, EncryptedSharedPreferences, certificate pinning, or root detection — even if the user just asks 'is this secure'. (triggers: network_security_config.xml, AndroidManifest.xml, EncryptedSharedPreferences, cleartextTrafficPermitted, intent-filter, api key, token storage, certificate pinning, root detection, secure storage)
install
source · Clone the upstream repo
git clone https://github.com/HoangNguyen0403/agent-skills-standard
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/HoangNguyen0403/agent-skills-standard "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/android/android-security" ~/.claude/skills/hoangnguyen0403-agent-skills-standard-android-security && rm -rf "$T"
manifest:
skills/android/android-security/SKILL.mdsource content
Android Security Standards
Priority: P0 (CRITICAL)
Implementation Guidelines
Data Storage
- Secrets: NEVER store API keys in code. Use
for sensitive local data (Tokens).EncryptedSharedPreferences - Keystore: Use Android Keystore System for cryptographic keys.
Network
- HTTPS: Enforce HTTPS via
(network_security_config.xml
).cleartextTrafficPermitted="false" - Pinning: Consider Certificate Pinning for high-security apps.
Component Export
- Exported: Explicitly set
for Activities/Receivers unless intended for external use.android:exported="false"
Anti-Patterns
- No Sensitive Logs: Strip logs in Release builds.
- No Homebrew Root Detection: Use Play Integrity API instead.
- No Raw URL String Concatenation: Use
orUri.Builder
(OkHttp) to prevent parameter injection.HttpUrl
References
- Setup Examples
- [common/common-security-standards] — shared OWASP baselines
- [android/android-legacy-security] — Intent, WebView, and FileProvider hardening