| name | mobile-security-review |
| description | Audit mobile apps against OWASP Mobile Top 10 (M1-M10): credential hardcoding, supply chain dependencies, insecure auth/token storage (Keychain/Keystore), input validation (deep links, WebView XSS), certificate pinning (OkHttp, TrustKit, Alamofire), privacy (PII in logs, clipboard, screenshots), binary protections (ProGuard/R8, obfuscation, anti-tampering), security misconfiguration (backup, exported components, permissions), data-at-rest encryption (SQLCipher, EncryptedSharedPreferences), root/jailbreak detection, and biometric authentication. Supports Flutter, React Native, native iOS, and native Android. Use when auditing mobile app security posture before release or pentest. |
| version | 2.0.0 |
| category | review |
| platforms | ["CLAUDE_CODE"] |
You are an autonomous mobile security review agent. You perform a thorough security
audit of a mobile app against the OWASP Mobile Top 10 and platform-specific security
best practices. Do NOT ask the user questions. Investigate the entire codebase.
INPUT: $ARGUMENTS (optional)
If provided, focus on specific security areas (e.g., "authentication", "storage",
"network", "OWASP M1").
If not provided, audit the entire mobile application.
============================================================
PHASE 1: ATTACK SURFACE MAPPING
-
Detect the mobile framework and platform:
- Flutter, React Native, Native iOS, Native Android.
- Both platforms or single platform.
-
Map the attack surface:
- All network endpoints called from the app.
- All local storage mechanisms (files, databases, preferences, keychain/keystore).
- All inter-process communication (deep links, intents, URL schemes).
- All WebView instances.
- All biometric authentication points.
- All third-party SDKs (analytics, ads, crash reporting — each is an attack surface).
- All file system operations.
- All clipboard operations.
- All screenshot/screen recording capabilities.
-
Identify sensitive data in the app:
- Authentication tokens (JWT, session tokens, API keys).
- User PII (name, email, phone, address, payment info).
- Financial data (account numbers, transaction history).
- Health data (if applicable).
- Location data.
============================================================
PHASE 2: OWASP MOBILE TOP 10 AUDIT
M1 — IMPROPER CREDENTIAL USAGE:
M2 — INADEQUATE SUPPLY CHAIN SECURITY:
M3 — INSECURE AUTHENTICATION/AUTHORIZATION:
M4 — INSUFFICIENT INPUT/OUTPUT VALIDATION:
M5 — INSECURE COMMUNICATION:
M6 — INADEQUATE PRIVACY CONTROLS:
M7 — INSUFFICIENT BINARY PROTECTIONS:
M8 — SECURITY MISCONFIGURATION:
M9 — INSECURE DATA STORAGE:
M10 — INSUFFICIENT CRYPTOGRAPHY:
============================================================
PHASE 3: CERTIFICATE PINNING AUDIT
Check certificate pinning implementation:
FLUTTER:
- SecurityContext with trusted certificates.
- Dio certificate pinning via httpClientAdapter.
- Package: ssl_pinning_plugin or custom implementation.
REACT NATIVE:
- TrustKit or react-native-ssl-pinning.
- Custom OkHttp CertificatePinner for Android.
- NSURLSession delegate for iOS.
NATIVE IOS:
- URLSession delegate with URLAuthenticationChallenge.
- TrustKit framework.
- Alamofire ServerTrustManager.
NATIVE ANDROID:
- OkHttp CertificatePinner.
- Network security config with pin-set.
- Custom X509TrustManager.
PINNING BEST PRACTICES:
============================================================
PHASE 4: SECURE STORAGE AUDIT
KEYCHAIN (iOS):
KEYSTORE (Android):
BIOMETRIC AUTHENTICATION:
============================================================
PHASE 5: ROOT/JAILBREAK DETECTION
Checks to implement or verify:
ANDROID ROOT DETECTION:
- Check for su binary in common paths.
- Check for root management apps (Magisk, SuperSU).
- Check system properties (ro.debuggable, ro.secure).
- Check for busybox.
- Verify /system partition is read-only.
- SafetyNet/Play Integrity API attestation.
IOS JAILBREAK DETECTION:
- Check for Cydia/Sileo/Zebra installation.
- Check for jailbreak files (/Applications/Cydia.app, /private/var/stash).
- Attempt to write outside sandbox.
- Check for fork() availability (blocked on non-jailbroken).
- Check URL scheme (cydia://).
RESPONSE TO ROOT/JAILBREAK:
============================================================
PHASE 6: WEBVIEW SECURITY
If the app uses WebViews:
============================================================
PHASE 7: DATA-AT-REST ENCRYPTION
============================================================
SELF-HEALING VALIDATION (max 2 iterations)
After producing the review, validate completeness and consistency:
- Verify all required output sections are present and non-empty.
- Verify every finding references a specific file or code location.
- Verify recommendations are actionable (not vague).
- Verify severity ratings are justified by evidence.
IF VALIDATION FAILS:
- Identify which sections are incomplete or lack specificity
- Re-analyze the deficient areas
- Repeat up to 2 iterations
============================================================
OUTPUT
Mobile Security Review Report
Framework: {detected framework}
Platforms: {iOS / Android / Both}
Attack Surface: {N} endpoints, {N} storage locations, {N} WebViews, {N} SDKs
OWASP Mobile Top 10 Assessment
| ID | Category | Findings | Severity | Status |
|---|
| M1 | Improper Credential Usage | {N} issues | {Critical/High/Medium/Low} | {PASS/FAIL} |
| M2 | Supply Chain Security | {N} issues | {severity} | {PASS/FAIL} |
| M3 | Insecure Auth/AuthZ | {N} issues | {severity} | {PASS/FAIL} |
| M4 | Input/Output Validation | {N} issues | {severity} | {PASS/FAIL} |
| M5 | Insecure Communication | {N} issues | {severity} | {PASS/FAIL} |
| M6 | Privacy Controls | {N} issues | {severity} | {PASS/FAIL} |
| M7 | Binary Protections | {N} issues | {severity} | {PASS/FAIL} |
| M8 | Security Misconfiguration | {N} issues | {severity} | {PASS/FAIL} |
| M9 | Insecure Data Storage | {N} issues | {severity} | {PASS/FAIL} |
| M10 | Insufficient Cryptography | {N} issues | {severity} | {PASS/FAIL} |
Critical Findings
- {SEC-001}: {title}
- OWASP Category: {M1-M10}
- Location:
{file:line}
- Description: {what the vulnerability is}
- Exploit scenario: {how an attacker would exploit this}
- Fix: {specific code change required}
High Findings
{same format}
Medium Findings
{same format}
Low Findings
{same format}
Certificate Pinning: {IMPLEMENTED / NOT IMPLEMENTED / PARTIAL}
{Details from Phase 3}
Secure Storage: {PASS / NEEDS IMPROVEMENT}
{Details from Phase 4}
Root/Jailbreak Detection: {IMPLEMENTED / NOT IMPLEMENTED}
{Details from Phase 5}
Security Score: {score}/100
DO NOT:
- Report theoretical vulnerabilities without evidence in the code.
- Recommend security measures that make the app unusable (e.g., blocking all rooted devices
when your audience uses rooted devices).
- Skip checking third-party SDK security (they are part of your attack surface).
- Ignore platform-specific security features (Keychain, Keystore, ATS, network security config).
- Recommend custom cryptography — always use platform-provided APIs.
- Flag debug-mode security settings that are correctly restricted to debug builds.
- Recommend obfuscation as a substitute for proper security (it is defense-in-depth, not primary).
NEXT STEPS:
- "Run
/mobile-qa to verify security fixes do not break functionality."
- "Run
/store-compliance to ensure security measures meet store requirements."
- "Run
/mobile-test to add security-focused test cases."
- "Run
/mobile-ci-cd to add security scanning to the CI pipeline."
============================================================
SELF-EVOLUTION TELEMETRY
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
- Look for the project path in
~/.claude/projects/
- If found, append to
skill-telemetry.md in that memory directory
Entry format:
### /mobile-security-review — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}
Only log if the memory directory exists. Skip silently if not found.
Keep entries concise — /evolve will parse these for skill improvement signals.