Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides Apple platform security: Keychain, biometrics, CryptoKit, Secure Enclave, certificate pinning, and secret migration.
Use this skill ↓50% 95%+45 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 11 of 22 without it.
3 of 3 safety checks passed
Not used yet
Scope: The 10 most dangerous security anti-patterns that AI coding assistants generate for iOS apps. Each entry includes the vulnerability explanation, realistic ❌ insecure code, ✅ correct replacement, detection heuristic, and OWASP risk mapping. This is the skill's backbone — the single most important file for correcting AI-generated security code.
Cross-references:
biometric-authentication.md(anti-pattern #3 deep dive),keychain-fundamentals.md(anti-pattern #4 CRUD patterns),keychain-access-control.md(anti-pattern #5 protection classes),cryptokit-symmetric.md(anti-patterns #6–7),credential-storage-patterns.md(anti-patterns #1–2 token lifecycle),migration-legacy-stores.md(anti-pattern #9 first-launch cleanup),compliance-owasp-mapping.md(full OWASP/MASVS mapping).
AI assistants optimize for functional correctness, not security — reproducing the most common patterns from training data, which are overwhelmingly insecure-by-default. Veracode's 2025 analysis: 45% of AI-generated code fails security tests. Cybernews: 815,000+ hardcoded secrets across 156,000 iOS apps (71% leaking ≥1 credential). Stanford: developers using AI write less secure code yet feel more confident.
Apple's security primitives (Keychain, CryptoKit, Secure Enclave) are excellent but AI consistently bypasses them. CISA/FBI classified hardcoded credentials as elevating "risk to national security" in their January 2025 Bad Practices v2.0 (CWE-798).
OWASP standard: Mobile Top 10 (2024) with MASTG v2 test IDs. Legacy MSTG-* identifiers noted where commonly referenced.
Severity: CRITICAL | OWASP: M9 (Insecure Data Storage) | Fix effort: Medium
Next to this one in the catalogue, plus more from the same author.