Skip to content
Skills Library
Security · Building & coding

mobile-app-security

/mobile-app-security

Protect a mobile app by storing secrets in the platform keystore, pinning certificates only where rotation is controlled, and treating obfuscation as delay rather than defense. Use when building or reviewing an iOS or Android app that holds tokens, keys, or user data on device.

Repository
AI-SKILLS ↗
Licence
MIT
Last repository change
05.09.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 05.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Protect a mobile app by storing secrets in the platform keystore, pinning certificates only where rotation is controlled, and treating obfuscation as delay rather than defense. Use when building or reviewing an iOS or Android app that holds tokens, keys, or user data on device.

Original author description

Protect a mobile app by storing secrets in the platform keystore, pinning certificates only where rotation is controlled, and treating obfuscation as delay rather than defense. Use when building or reviewing an iOS or Android app that holds tokens, keys, or user data on device.

How it works

  1. Method
  2. Signals
  3. Boundaries
Original SKILL.md headings · 52 lines, 437 words
SKILL.md preview
---
name: mobile-app-security
description: Protect a mobile app by storing secrets in the platform keystore, pinning certificates only where rotation is controlled, and treating obfuscation as delay rather than defense. Use when building or reviewing an iOS or Android app that holds tokens, keys, or user data on device.
---

# Mobile app security

A mobile binary runs on hardware the attacker owns. They can decompile it,
read its storage, and proxy its traffic on a rooted phone. The recurring
mistakes all treat the device as trusted: secrets dropped in plain
preferences, a binary that carries its own API keys, and obfuscation mistaken
for a control. Build for an environment where the user may be the adversary.

## Method

1. **Store secrets in the hardware-backed store, not flat files.** Put tokens
   and keys in the iOS Keychain with
   `kSecAttrAccessibleWhenUnlockedThisDeviceOnly`, or the Android Keystore,
   never in `UserDefaults`, `SharedPreferences`, SQLite, or a plist. Those
   sit in cleartext in the sandbox and in cloud backups.
2. **Ship no long-lived secret in the binary.** Anything compiled in falls out
   to `strings`, Hopper, or jadx. Keep API secrets server-side, hand the app
   short-lived tokens, and route any third-party call that needs a secret
   through your own backend.
3. **Pin certificates only where you can rotate fast.** Pin to the CA or
   intermediate public key rather than the leaf, and ship at least one backup
   pin so a cert renewal does not brick installed apps. Skip pinning when you
   cannot push an update quickly enough to survive an emergency key change.
4. **State the ceiling on obfuscation.** R8, ProGuard, or a commercial packer
   buys minutes to hours against a reverse engineer, not permanence. Use it to
   slow analysis, never as the barrier between an attacker and a value that
   must stay secret, since Frida reads it at runtime regardless.
5. **Keep sensitive data off the OS surface.** Exclude token files from iCloud
   and Android auto-backup, set `FLAG_SECURE` or blur on backgrounding so
   screens stay out of the app switcher and screenshots, and validate deep
   links and custom URL schemes as untrusted input.
6. **Treat root and jailbreak detection as signal, not a gate.** It helps fraud
   scoring and can trip a casual attacker, but any client check runs on the
   attacker's device and gets patched out. Enforce every trust decision on the
   server.

## Signals

- Does pulling the app sandbox off a rooted device reveal any token in
  cleartext?
- Does a server cert renewal keep old installs working through a backup pin?
- Can the app still enforce authorization once root detection is bypassed?
- Do sensitive screens stay blank in the task switcher and screenshots?

## Boundaries

This addresses on-device storage, transport trust, and binary hardening. It
does not cover the API the app talks to (see api-security) or the flow that
issues its tokens (see oauth-flows). Server-side enforcement stays the real
control: the client hardens, it does not decide.

Versions

The database has no other skills named mobile-app-security.

Database snapshot: 13.11.2026 · package version 458f15bbb6bd (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100mobile-app-security-keychain-keystore
    Use this skill when protecting sensitive credentials, cryptographic keys, and auth tokens using iOS Keychain and Android Keystore.
  • 90mobile-security
    Use this skill when the user asks about mobile security, secure storage, certificate pinning, SSL pinning, biometric authentication, data encryption, ProGuard, obfuscation, or OWASP Mobile Top 10.
  • 100watchdog-go-mobile-app
    On-demand mobile audit (Android/iOS/Flutter/React Native: pinning, storage, deep links, WebViews, bridges). Use for /watchdog-go-mobile-app. Defensive use only.
  • 100mobile-app-exposure-audit
    Use when asked what a person can learn from a mobile app's release build, whether secrets or API keys ship inside an iOS or Android app, whether R8, ProGuard or iOS strip settings protect an app, or to make a shareable HTML report of app-binary exposure. Covers React Native…
  • 100flutter-security-expert
    Flutter mobile security and privacy compliance specialist. Use for secure storage reviews, certificate pinning, GDPR/CCPA compliance, code obfuscation, and mobile-specific security hardening. For general OWASP issues use security-reviewer instead.
  • 100mobile-app-security-review
    Review iOS and Android application security against OWASP MASVS/MASTG — static analysis (MobSF, jadx, apktool), data storage, network security (ATS, network security config, certificate pinning), authentication and token handling, platform interaction (intents, deep links,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.