Security & Credentials
You MUST use this skill for ANY keychain, encryption, passkey, app integrity, agentic/AI feature security, file protection, or code signing work.
Auditors are skills here. Where this router says "Launch some-auditor agent", invoke the
matching Codex skill instead — same procedure, no Claude Code agent required.
Available: axiom-scan-security-privacy.
The ones that shell out — builds, tests, simulators, crash symbolication — need shell access to run.
Quick Reference
| Symptom / Task |
Reference |
| Store tokens, passwords, API keys securely |
See skills/keychain.md |
| Choose kSecAttrAccessible level, biometric protection |
See skills/keychain.md |
| SecItem function signatures, attribute constants |
See skills/keychain-ref.md |
| errSecDuplicateItem, errSecItemNotFound, errSecInteractionNotAllowed |
See skills/keychain-diag.md |
| Encrypt data, sign payloads, key management |
See skills/cryptokit.md |
| Hash functions, HMAC, AES-GCM, ChaChaPoly, ECDSA, EdDSA, key agreement |
See skills/cryptokit-ref.md |
| Passkey sign-in, WebAuthn, ASAuthorizationController |
See skills/passkeys.md |
One-time code AutoFill for credential providers OS27 |
See skills/passkeys.md (Delivered Verification Codes) |
| App integrity verification, DCAppAttestService, fraud metric |
See skills/app-attest.md |
| Prompt injection, securing AI agents / agentic features, tool confirmation |
See skills/agentic-security.md |
| NSFileProtection levels, data protection at rest |
See skills/file-protection-ref.md |
| SensitiveContentAnalysis verdict must never leave the device (no analytics/moderation queue/synced cache; license §3.3.3) |
See axiom-vision (skills/vision-ref.md) |
| Certificate management, provisioning profiles, CI/CD signing |
See skills/code-signing.md |
| Certificate not found, profile mismatch, entitlement errors |
See skills/code-signing-diag.md |
| Certificate CLI, profile inspection, entitlement extraction |
See skills/code-signing-ref.md |
| Apple Pay payment certs / pass type certs / Tap to Pay entitlement |
See axiom-payments suite |
Decision Tree
digraph security {
start [label="Security task" shape=ellipse];
what [label="What do you need?" shape=diamond];
start -> what;
what -> "skills/keychain.md" [label="store/retrieve\ncredentials, tokens,\nsecrets"];
what -> "skills/keychain-ref.md" [label="SecItem API syntax,\nattribute constants,\naccess levels"];
what -> "skills/keychain-diag.md" [label="keychain errors\n(errSec codes)"];
what -> "skills/cryptokit.md" [label="encrypt data,\nsign payloads,\nSecure Enclave keys"];
what -> "skills/cryptokit-ref.md" [label="CryptoKit API\n(AES, ECDSA, HPKE,\npost-quantum)"];
what -> "skills/passkeys.md" [label="passkey sign-in,\nreplace passwords"];
what -> "skills/app-attest.md" [label="app integrity,\nfraud prevention"];
what -> "skills/agentic-security.md" [label="AI agent security,\nprompt injection"];
what -> "skills/file-protection-ref.md" [label="file encryption,\nNSFileProtection"];
what -> "skills/code-signing.md" [label="set up signing,\nprofiles, CI/CD"];
what -> "skills/code-signing-diag.md" [label="signing errors,\nupload rejections"];
what -> "skills/code-signing-ref.md" [label="CLI commands,\nprofile inspection"];
}
- Store tokens, passwords, API keys securely? →
skills/keychain.md
1a. Need SecItem function signatures, attribute constants? → skills/keychain-ref.md
1b. Keychain errors (errSecDuplicateItem, errSecItemNotFound)? → skills/keychain-diag.md
- Encrypt data, sign payloads, manage keys? →
skills/cryptokit.md
2a. Need CryptoKit API details (AES-GCM, ECDSA, HPKE, post-quantum)? → skills/cryptokit-ref.md
- Implement passkey sign-in, replace passwords? →
skills/passkeys.md
- Verify app integrity, prevent fraud? →
skills/app-attest.md
- Securing an agentic/AI feature (prompt injection, tool confirmation, lock-screen intents)? →
skills/agentic-security.md
- File encryption at rest, NSFileProtection levels? →
skills/file-protection-ref.md
- Set up code signing, manage certificates, CI/CD? →
skills/code-signing.md
7a. Code signing error troubleshooting? → skills/code-signing-diag.md
7b. Certificate CLI commands, profile inspection? → skills/code-signing-ref.md
- Build/upload failures after signing? → See axiom-build
- App Store submission prep? →
/skill axiom-shipping
- Privacy manifests, tracking transparency? → See axiom-integration
- Data persistence (SwiftData, Core Data, storage strategy)? →
/skill axiom-data
- TLS configuration, certificate pinning for network requests? →
/skill axiom-networking
- Want automated security scan? → security-privacy-scanner (Agent)
Conflict Resolution
security vs axiom-build: When build fails with signing errors:
- Code signing errors (certificate, profile, entitlement) → use security
- Environment issues (Xcode version, simulator, Derived Data) → use axiom-build
- If unsure, check the error message:
CODESIGN, ITMS-90xxx, errSec → security
security vs shipping: When preparing for App Store:
- Privacy manifests, submission checklists, rejections → use shipping
- Code signing for distribution, certificate management → use security
security vs axiom-data: When storing sensitive data:
- Tokens, passwords, API keys → use security (keychain)
- User preferences, non-sensitive settings → use axiom-data (UserDefaults/SwiftData)
- File encryption levels for database files → use security (file-protection-ref)
- SQLite-specific Data Protection (
.db/-wal/-shm trio, widget-while-locked access) → See axiom-data (skills/grdb-app-groups.md) §4
security vs axiom-networking: When securing network communication:
- TLS configuration, certificate pinning → use axiom-networking
- Signing API requests, encrypting payloads → use security (CryptoKit)
Critical Patterns
Keychain (skills/keychain.md):
- SecItem mental model: uniqueness constraints, data protection classes
- Biometric access control (Face ID / Touch ID)
- Keychain sharing between app and extensions
- Background access pitfalls, Mac keychain differences
- Migration from UserDefaults/@AppStorage for sensitive data
Keychain API (skills/keychain-ref.md):
- SecItemAdd/CopyMatching/Update/Delete signatures
- Item class attributes, uniqueness constraint rules
- kSecAttrAccessible levels and when each applies
- Access control flags, biometric integration
- Complete error code reference
Keychain Diagnostics (skills/keychain-diag.md):
- errSecDuplicateItem from unexpected uniqueness constraints
- errSecItemNotFound despite item existing (query mismatch)
- errSecInteractionNotAllowed in background contexts
- Access group and entitlement mismatches
- Items disappearing after app updates
CryptoKit (skills/cryptokit.md):
- AES-GCM and ChaChaPoly authenticated encryption
- ECDSA/EdDSA digital signatures
- Secure Enclave hardware-backed keys
- Key agreement (ECDH) for end-to-end encryption
- HPKE for modern asymmetric encryption
- Post-quantum algorithms (ML-KEM, ML-DSA)
- CommonCrypto migration path
CryptoKit API (skills/cryptokit-ref.md):
- Hash functions (SHA-256/384/512, SHA-3), HMAC
- Symmetric encryption (AES-GCM, ChaChaPoly)
- Asymmetric signing (P256, P384, P521, Curve25519, Ed25519)
- Key agreement, key derivation (HKDF)
- Secure Enclave key creation and usage
- Swift Crypto cross-platform parity
Passkeys (skills/passkeys.md):
- ASAuthorizationController registration and assertion flows
- AutoFill-assisted requests (QuickType bar integration)
- Automatic passkey upgrades for existing users (iOS 18+)
- Combined credential requests (passkey + password + Sign in with Apple)
- Associated domains configuration for WebAuthn
App Attest (skills/app-attest.md):
- DCAppAttestService attestation and assertion flows
- Server-side validation of attestation objects
- macOS support + tampering signals (extensions, key access control) from the 27 cycle
- Fraud metric as an investigation signal
- DeviceCheck 2-bit per-device state
- Gradual rollout strategies for large install bases
- Handling unsupported devices gracefully
Agentic Security (skills/agentic-security.md):
- Threat modeling agentic features (indirect prompt injection, Lethal Trifecta)
- Deterministic vs probabilistic mitigations (redaction, spotlighting, confirmation, unlock gating)
- Foundation Models lifecycle modifiers (.onToolCall confirmation, .historyTransform)
- App Intents authenticationPolicy and schema risk metadata
File Protection (skills/file-protection-ref.md):
- NSFileProtection levels (complete, completeUnlessOpen, afterFirstUnlock, none)
- Hardware-accelerated encryption tied to device passcode
- Background file access requirements
- Keychain vs file protection comparison
Code Signing (skills/code-signing.md):
- Automatic vs manual signing tradeoffs
- Certificate and profile management across teams
- fastlane match for team-wide certificate sharing
- CI/CD signing setup (GitHub Actions, Xcode Cloud)
- Distribution build preparation (App Store, TestFlight, Ad Hoc)
Code Signing Diagnostics (skills/code-signing-diag.md):
- Certificate issues (expired, missing, wrong type, revoked)
- Provisioning profile issues (expired, missing cert, wrong App ID)
- Entitlement mismatches (capability in Xcode but not in profile)
- Keychain issues in CI (locked keychain, errSecInternalComponent)
- Archive/export failures (wrong export method, wrong cert type)
Code Signing CLI (skills/code-signing-ref.md):
security find-identity, security cms -D for profile inspection
codesign -d --entitlements for entitlement extraction
- Certificate types, validity periods, per-account limits
- fastlane match commands and Keychain management
Automated Scanning
Security audit → axiom-scan-security-privacy (scans for hardcoded credentials, insecure token storage, Privacy Manifest coverage gaps, ATS violations, missing ATT descriptions, missing export compliance, weak Keychain ACLs, and compound rejection risks; scores posture HARDENED/GAPS/VULNERABLE)
Anti-Rationalization
| Thought |
Reality |
| "I'll store the token in UserDefaults for now" |
UserDefaults is a plist file readable by any process with file access. Keychain takes 10 lines. skills/keychain.md shows the pattern. |
| "My app doesn't need encryption" |
If you store any user data at rest, iOS file protection is free. skills/file-protection-ref.md covers protection levels. |
| "CommonCrypto works fine, no need to migrate" |
CommonCrypto is C API with manual memory management and no compile-time safety. CryptoKit prevents buffer overflows and key misuse. |
| "I'll just use automatic signing" |
Automatic signing works until CI, team scaling, or capability changes break it. Understand manual signing before you need it. skills/code-signing.md covers both. |
| "Passkeys are too new, passwords are fine" |
Passkeys are phishing-resistant and supported since iOS 16. The migration path supports both simultaneously. skills/passkeys.md shows combined flows. |
| "I'll regenerate all certificates to fix this" |
Regenerating revokes existing certs and breaks every teammate's build. Diagnose first. skills/code-signing-diag.md has the diagnostic flow. |
| "App Attest is overkill for my app" |
If your app has any server-verified purchase, promotion, or competitive feature, tampered clients will exploit it. skills/app-attest.md covers gradual rollout. |
| "I'll use @unchecked Sendable on my crypto wrapper" |
Hiding thread-safety issues from the compiler in security code is how data corruption happens. See axiom-concurrency for safe patterns. |
| "kSecAttrAccessibleAlways is fine" |
Deprecated since iOS 12. Items are accessible even when device is locked and unencrypted during backup. Use kSecAttrAccessibleAfterFirstUnlock at minimum. |
| "Prompt injection won't hit our little AI feature" |
Any external content reaching your model (a calendar invite, a feed post) is the attack surface, and the model picks the actions. skills/agentic-security.md has the threat model and the deterministic mitigations. |
Example Invocations
User: "How do I store an auth token securely?"
→ Read: skills/keychain.md
User: "errSecDuplicateItem when saving to keychain"
→ Read: skills/keychain-diag.md
User: "What are the SecItem attribute constants?"
→ Read: skills/keychain-ref.md
User: "How do I encrypt user data with AES?"
→ Read: skills/cryptokit.md
User: "What's the CryptoKit API for ECDSA signing?"
→ Read: skills/cryptokit-ref.md
User: "How do I add passkey sign-in to my app?"
→ Read: skills/passkeys.md
User: "How do I verify my app hasn't been tampered with?"
→ Read: skills/app-attest.md
User: "How do I protect my app's AI agent from prompt injection?"
→ Read: skills/agentic-security.md
User: "Should my Siri intent work from the lock screen?"
→ Read: skills/agentic-security.md
User: "What NSFileProtection level should I use?"
→ Read: skills/file-protection-ref.md
User: "My build fails with 'No signing certificate found'"
→ Read: skills/code-signing-diag.md
User: "How do I set up fastlane match for CI?"
→ Read: skills/code-signing.md
User: "How do I inspect a provisioning profile?"
→ Read: skills/code-signing-ref.md
User: "Scan my code for security issues"
→ Invoke: security-privacy-scanner agent
1---2name: axiom-security3description: Use when storing credentials securely, encrypting data, implementing passkeys, securing AI/agentic features against prompt injection, code signing, or managing certificates and provisioning profiles.4license: MIT5---6
7# Security & Credentials
8
9**You MUST use this skill for ANY keychain, encryption, passkey, app integrity, agentic/AI feature security, file protection, or code signing work.**
10
11<!-- AXIOM_AUDITOR_INLINE_BEGIN — rewritten for Codex by scripts/build-codex.ts; do not hand-edit -->
12> **Auditors are skills here.** Where this router says "Launch `some-auditor` agent", invoke the
13> matching Codex skill instead — same procedure, no Claude Code agent required.
14>
15> Available: `axiom-scan-security-privacy`.
16>
17> The ones that shell out — builds, tests, simulators, crash symbolication — need shell access to run.
18<!-- AXIOM_AUDITOR_INLINE_END -->
19
20## Quick Reference
21
22| Symptom / Task | Reference |
23|----------------|-----------|
24| Store tokens, passwords, API keys securely | See `skills/keychain.md` |
25| Choose kSecAttrAccessible level, biometric protection | See `skills/keychain.md` |
26| SecItem function signatures, attribute constants | See `skills/keychain-ref.md` |
27| errSecDuplicateItem, errSecItemNotFound, errSecInteractionNotAllowed | See `skills/keychain-diag.md` |
28| Encrypt data, sign payloads, key management | See `skills/cryptokit.md` |
29| Hash functions, HMAC, AES-GCM, ChaChaPoly, ECDSA, EdDSA, key agreement | See `skills/cryptokit-ref.md` |
30| Passkey sign-in, WebAuthn, ASAuthorizationController | See `skills/passkeys.md` |
31| One-time code AutoFill for credential providers `OS27` | See `skills/passkeys.md` (Delivered Verification Codes) |
32| App integrity verification, DCAppAttestService, fraud metric | See `skills/app-attest.md` |
33| Prompt injection, securing AI agents / agentic features, tool confirmation | See `skills/agentic-security.md` |
34| NSFileProtection levels, data protection at rest | See `skills/file-protection-ref.md` |
35| SensitiveContentAnalysis verdict must never leave the device (no analytics/moderation queue/synced cache; license §3.3.3) | See `axiom-vision` (skills/vision-ref.md) |
36| Certificate management, provisioning profiles, CI/CD signing | See `skills/code-signing.md` |
37| Certificate not found, profile mismatch, entitlement errors | See `skills/code-signing-diag.md` |
38| Certificate CLI, profile inspection, entitlement extraction | See `skills/code-signing-ref.md` |
39| Apple Pay payment certs / pass type certs / Tap to Pay entitlement | See `axiom-payments` suite |
40
41## Decision Tree
42
43```dot
44digraph security {
45 start [label="Security task" shape=ellipse];
46 what [label="What do you need?" shape=diamond];
47
48 start -> what;
49 what -> "skills/keychain.md" [label="store/retrieve\ncredentials, tokens,\nsecrets"];
50 what -> "skills/keychain-ref.md" [label="SecItem API syntax,\nattribute constants,\naccess levels"];
51 what -> "skills/keychain-diag.md" [label="keychain errors\n(errSec codes)"];
52 what -> "skills/cryptokit.md" [label="encrypt data,\nsign payloads,\nSecure Enclave keys"];
53 what -> "skills/cryptokit-ref.md" [label="CryptoKit API\n(AES, ECDSA, HPKE,\npost-quantum)"];
54 what -> "skills/passkeys.md" [label="passkey sign-in,\nreplace passwords"];
55 what -> "skills/app-attest.md" [label="app integrity,\nfraud prevention"];
56 what -> "skills/agentic-security.md" [label="AI agent security,\nprompt injection"];
57 what -> "skills/file-protection-ref.md" [label="file encryption,\nNSFileProtection"];
58 what -> "skills/code-signing.md" [label="set up signing,\nprofiles, CI/CD"];
59 what -> "skills/code-signing-diag.md" [label="signing errors,\nupload rejections"];
60 what -> "skills/code-signing-ref.md" [label="CLI commands,\nprofile inspection"];
61}
62```
63
641. Store tokens, passwords, API keys securely? → `skills/keychain.md`
651a. Need SecItem function signatures, attribute constants? → `skills/keychain-ref.md`
661b. Keychain errors (errSecDuplicateItem, errSecItemNotFound)? → `skills/keychain-diag.md`
672. Encrypt data, sign payloads, manage keys? → `skills/cryptokit.md`
682a. Need CryptoKit API details (AES-GCM, ECDSA, HPKE, post-quantum)? → `skills/cryptokit-ref.md`
693. Implement passkey sign-in, replace passwords? → `skills/passkeys.md`
704. Verify app integrity, prevent fraud? → `skills/app-attest.md`
715. Securing an agentic/AI feature (prompt injection, tool confirmation, lock-screen intents)? → `skills/agentic-security.md`
726. File encryption at rest, NSFileProtection levels? → `skills/file-protection-ref.md`
737. Set up code signing, manage certificates, CI/CD? → `skills/code-signing.md`
747a. Code signing error troubleshooting? → `skills/code-signing-diag.md`
757b. Certificate CLI commands, profile inspection? → `skills/code-signing-ref.md`
768. Build/upload failures after signing? → See axiom-build
779. App Store submission prep? → `/skill axiom-shipping`
7810. Privacy manifests, tracking transparency? → See axiom-integration
7911. Data persistence (SwiftData, Core Data, storage strategy)? → `/skill axiom-data`
8012. TLS configuration, certificate pinning for network requests? → `/skill axiom-networking`
8113. Want automated security scan? → security-privacy-scanner (Agent)
82
83## Conflict Resolution
84
85**security vs axiom-build**: When build fails with signing errors:
86- Code signing errors (certificate, profile, entitlement) → **use security**
87- Environment issues (Xcode version, simulator, Derived Data) → **use axiom-build**
88- If unsure, check the error message: `CODESIGN`, `ITMS-90xxx`, `errSec` → **security**
89
90**security vs shipping**: When preparing for App Store:
91- Privacy manifests, submission checklists, rejections → **use shipping**
92- Code signing for distribution, certificate management → **use security**
93
94**security vs axiom-data**: When storing sensitive data:
95- Tokens, passwords, API keys → **use security** (keychain)
96- User preferences, non-sensitive settings → **use axiom-data** (UserDefaults/SwiftData)
97- File encryption levels for database files → **use security** (file-protection-ref)
98- SQLite-specific Data Protection (`.db`/`-wal`/`-shm` trio, widget-while-locked access) → See axiom-data (skills/grdb-app-groups.md) §4
99
100**security vs axiom-networking**: When securing network communication:
101- TLS configuration, certificate pinning → **use axiom-networking**
102- Signing API requests, encrypting payloads → **use security** (CryptoKit)
103
104## Critical Patterns
105
106**Keychain** (`skills/keychain.md`):
107- SecItem mental model: uniqueness constraints, data protection classes
108- Biometric access control (Face ID / Touch ID)
109- Keychain sharing between app and extensions
110- Background access pitfalls, Mac keychain differences
111- Migration from UserDefaults/@AppStorage for sensitive data
112
113**Keychain API** (`skills/keychain-ref.md`):
114- SecItemAdd/CopyMatching/Update/Delete signatures
115- Item class attributes, uniqueness constraint rules
116- kSecAttrAccessible levels and when each applies
117- Access control flags, biometric integration
118- Complete error code reference
119
120**Keychain Diagnostics** (`skills/keychain-diag.md`):
121- errSecDuplicateItem from unexpected uniqueness constraints
122- errSecItemNotFound despite item existing (query mismatch)
123- errSecInteractionNotAllowed in background contexts
124- Access group and entitlement mismatches
125- Items disappearing after app updates
126
127**CryptoKit** (`skills/cryptokit.md`):
128- AES-GCM and ChaChaPoly authenticated encryption
129- ECDSA/EdDSA digital signatures
130- Secure Enclave hardware-backed keys
131- Key agreement (ECDH) for end-to-end encryption
132- HPKE for modern asymmetric encryption
133- Post-quantum algorithms (ML-KEM, ML-DSA)
134- CommonCrypto migration path
135
136**CryptoKit API** (`skills/cryptokit-ref.md`):
137- Hash functions (SHA-256/384/512, SHA-3), HMAC
138- Symmetric encryption (AES-GCM, ChaChaPoly)
139- Asymmetric signing (P256, P384, P521, Curve25519, Ed25519)
140- Key agreement, key derivation (HKDF)
141- Secure Enclave key creation and usage
142- Swift Crypto cross-platform parity
143
144**Passkeys** (`skills/passkeys.md`):
145- ASAuthorizationController registration and assertion flows
146- AutoFill-assisted requests (QuickType bar integration)
147- Automatic passkey upgrades for existing users (iOS 18+)
148- Combined credential requests (passkey + password + Sign in with Apple)
149- Associated domains configuration for WebAuthn
150
151**App Attest** (`skills/app-attest.md`):
152- DCAppAttestService attestation and assertion flows
153- Server-side validation of attestation objects
154- macOS support + tampering signals (extensions, key access control) from the 27 cycle
155- Fraud metric as an investigation signal
156- DeviceCheck 2-bit per-device state
157- Gradual rollout strategies for large install bases
158- Handling unsupported devices gracefully
159
160**Agentic Security** (`skills/agentic-security.md`):
161- Threat modeling agentic features (indirect prompt injection, Lethal Trifecta)
162- Deterministic vs probabilistic mitigations (redaction, spotlighting, confirmation, unlock gating)
163- Foundation Models lifecycle modifiers (.onToolCall confirmation, .historyTransform)
164- App Intents authenticationPolicy and schema risk metadata
165
166**File Protection** (`skills/file-protection-ref.md`):
167- NSFileProtection levels (complete, completeUnlessOpen, afterFirstUnlock, none)
168- Hardware-accelerated encryption tied to device passcode
169- Background file access requirements
170- Keychain vs file protection comparison
171
172**Code Signing** (`skills/code-signing.md`):
173- Automatic vs manual signing tradeoffs
174- Certificate and profile management across teams
175- fastlane match for team-wide certificate sharing
176- CI/CD signing setup (GitHub Actions, Xcode Cloud)
177- Distribution build preparation (App Store, TestFlight, Ad Hoc)
178
179**Code Signing Diagnostics** (`skills/code-signing-diag.md`):
180- Certificate issues (expired, missing, wrong type, revoked)
181- Provisioning profile issues (expired, missing cert, wrong App ID)
182- Entitlement mismatches (capability in Xcode but not in profile)
183- Keychain issues in CI (locked keychain, errSecInternalComponent)
184- Archive/export failures (wrong export method, wrong cert type)
185
186**Code Signing CLI** (`skills/code-signing-ref.md`):
187- `security find-identity`, `security cms -D` for profile inspection
188- `codesign -d --entitlements` for entitlement extraction
189- Certificate types, validity periods, per-account limits
190- fastlane match commands and Keychain management
191
192## Automated Scanning
193
194**Security audit** → `axiom-scan-security-privacy` (scans for hardcoded credentials, insecure token storage, Privacy Manifest coverage gaps, ATS violations, missing ATT descriptions, missing export compliance, weak Keychain ACLs, and compound rejection risks; scores posture HARDENED/GAPS/VULNERABLE)
195
196## Anti-Rationalization
197
198| Thought | Reality |
199|---------|---------|
200| "I'll store the token in UserDefaults for now" | UserDefaults is a plist file readable by any process with file access. Keychain takes 10 lines. `skills/keychain.md` shows the pattern. |
201| "My app doesn't need encryption" | If you store any user data at rest, iOS file protection is free. `skills/file-protection-ref.md` covers protection levels. |
202| "CommonCrypto works fine, no need to migrate" | CommonCrypto is C API with manual memory management and no compile-time safety. CryptoKit prevents buffer overflows and key misuse. |
203| "I'll just use automatic signing" | Automatic signing works until CI, team scaling, or capability changes break it. Understand manual signing before you need it. `skills/code-signing.md` covers both. |
204| "Passkeys are too new, passwords are fine" | Passkeys are phishing-resistant and supported since iOS 16. The migration path supports both simultaneously. `skills/passkeys.md` shows combined flows. |
205| "I'll regenerate all certificates to fix this" | Regenerating revokes existing certs and breaks every teammate's build. Diagnose first. `skills/code-signing-diag.md` has the diagnostic flow. |
206| "App Attest is overkill for my app" | If your app has any server-verified purchase, promotion, or competitive feature, tampered clients will exploit it. `skills/app-attest.md` covers gradual rollout. |
207| "I'll use @unchecked Sendable on my crypto wrapper" | Hiding thread-safety issues from the compiler in security code is how data corruption happens. See axiom-concurrency for safe patterns. |
208| "kSecAttrAccessibleAlways is fine" | Deprecated since iOS 12. Items are accessible even when device is locked and unencrypted during backup. Use kSecAttrAccessibleAfterFirstUnlock at minimum. |
209| "Prompt injection won't hit our little AI feature" | Any external content reaching your model (a calendar invite, a feed post) is the attack surface, and the model picks the actions. `skills/agentic-security.md` has the threat model and the deterministic mitigations. |
210
211## Example Invocations
212
213User: "How do I store an auth token securely?"
214→ Read: `skills/keychain.md`
215
216User: "errSecDuplicateItem when saving to keychain"
217→ Read: `skills/keychain-diag.md`
218
219User: "What are the SecItem attribute constants?"
220→ Read: `skills/keychain-ref.md`
221
222User: "How do I encrypt user data with AES?"
223→ Read: `skills/cryptokit.md`
224
225User: "What's the CryptoKit API for ECDSA signing?"
226→ Read: `skills/cryptokit-ref.md`
227
228User: "How do I add passkey sign-in to my app?"
229→ Read: `skills/passkeys.md`
230
231User: "How do I verify my app hasn't been tampered with?"
232→ Read: `skills/app-attest.md`
233
234User: "How do I protect my app's AI agent from prompt injection?"
235→ Read: `skills/agentic-security.md`
236
237User: "Should my Siri intent work from the lock screen?"
238→ Read: `skills/agentic-security.md`
239
240User: "What NSFileProtection level should I use?"
241→ Read: `skills/file-protection-ref.md`
242
243User: "My build fails with 'No signing certificate found'"
244→ Read: `skills/code-signing-diag.md`
245
246User: "How do I set up fastlane match for CI?"
247→ Read: `skills/code-signing.md`
248
249User: "How do I inspect a provisioning profile?"
250→ Read: `skills/code-signing-ref.md`
251
252User: "Scan my code for security issues"
253→ Invoke: `security-privacy-scanner` agent