---
name: role-mobile-mobile-security-54ddc8d765c2
description: Expert guidance on mobile application security — certificate pinning, secure storage (Keychain on iOS, KeyStore on Android), code obfuscation (ProGuard, R8), root/jailbreak detection, biometric authentication, secure inter-process communication, and App Transport Security. Use when hardening mobile apps or implementing security features.
allowed-tools: Read, Grep, Glob, Bash
---

# Mobile Security

## When to use
- Implementing certificate pinning to prevent MITM attacks
- Storing tokens, keys, or credentials securely on-device
- Enabling R8/ProGuard obfuscation and verifying the mapping file
- Adding root/jailbreak detection with layered strategies
- Integrating biometric authentication (Face ID, Touch ID, BiometricPrompt)
- Hardening IPC: intent validation, Universal Links, ContentProvider permissions
- Auditing App Transport Security exceptions before App Store submission

## Core principles
1. **Device is hostile by default** — assume the attacker has physical access and a debugger
2. **Two pins, always** — a single certificate pin that expires locks out every user in production
3. **Keychain/KeyStore, not files** — hardware-backed key storage exists; use it
4. **Multi-layer detection** — one jailbreak check is bypassable in 30 seconds; five is a weekend project
5. **Never trust client-side alone** — client detection is delay, not prevention; validate on the server too

## Reference Files

- `references/network-storage-security.md` — certificate pinning rationale, iOS URLSession/NSPinnedDomains/TrustKit implementation, Android network_security_config.xml and OkHttp CertificatePinner, cross-platform pinning libraries, iOS Keychain Services access controls, Android KeyStore hardware-backed keys and EncryptedSharedPreferences, cross-platform secure storage libraries, App Transport Security configuration
- `references/obfuscation-runtime-auth.md` — Android R8/ProGuard configuration and resource shrinking, iOS symbol stripping, React Native/Flutter obfuscation caveats, root/jailbreak detection strategies and evasion limits, iOS LAContext biometrics, Android BiometricPrompt with CryptoObject, secure IPC patterns (explicit intents, Universal Links, ContentProvider permissions)


---
Source attribution: rnavarych
Original project: https://github.com/rnavarych/alpha-engineer/blob/c5b74102c7fd584af3d344ba7c331a7bbec3c729/plugins/roles/role-mobile/skills/mobile-security/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Raman Navarych

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: rnavarych
Original project: https://github.com/rnavarych/alpha-engineer/blob/c5b74102c7fd584af3d344ba7c331a7bbec3c729/plugins/roles/role-mobile/skills/mobile-security/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering
Roles: DevOps / SRE, Mobile Developer, Security Engineer
Specialties: Backend, Mobile
Tools: Bash, Glob, Grep
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 2a36d0e6cca5a8225738a1ab69dbfa6e6597e8e58680c216939e81f0c305115a
