Axiom security

From CharlesWiltgen/Axiom · View interactive version

Axiom security is an AI agent skill from the GitHub repository CharlesWiltgen/Axiom. Use when storing credentials securely, encrypting data, implementing passkeys, securing AI/agentic features against prompt injection, code signing, or managing certificates and provisioning profiles.

How to use this skill

Skill file

Security & Credentials

You MUST use this skill for ANY keychain, encryption, passkey, app integrity, agentic/AI feature security, file protection, or code signing work.

<!-- AXIOM_AUDITOR_INLINE_BEGIN — auto-maintained by scripts/build-inlined-auditors.ts; do not hand-edit -->

Can't launch Axiom agents? Where this router sends you to an agent, follow its procedure inline. Over MCP, axiom_get_agent returns it; elsewhere, read its file below, which needs only file search and read.

Available here: skills/security-privacy-scanner.md.

For any other agent, over MCP axiom_get_agent returns it too; run its xclog, xcsym and xcprof steps with the axiom_xclog_*, axiom_xcsym_* and axiom_xcprof_* tools. Elsewhere, search Axiom's skills for skills/<agent>.md; if there is none, do that work yourself with this suite's skills, using any Axiom tool on your PATH.

<!-- AXIOM_AUDITOR_INLINE_END -->

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"];
}
  1. 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

  1. Encrypt data, sign payloads, manage keys? → skills/cryptokit.md

2a. Need CryptoKit API details (AES-GCM, ECDSA, HPKE, post-quantum)? → skills/cryptokit-ref.md

  1. Implement passkey sign-in, replace passwords? → skills/passkeys.md
  2. Verify app integrity, prevent fraud? → skills/app-attest.md
  3. Securing an agentic/AI feature (prompt injection, tool confirmation, lock-screen intents)? → skills/agentic-security.md
  4. File encryption at rest, NSFileProtection levels? → skills/file-protection-ref.md
  5. 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

  1. Build/upload failures after signing? → See axiom-build
  2. App Store submission prep? → /skill axiom-shipping
  3. Privacy manifests, tracking transparency? → See axiom-integration
  4. Data persistence (SwiftData, Core Data, storage strategy)? → /skill axiom-data
  5. TLS configuration, certificate pinning for network requests? → /skill axiom-networking
  6. Want automated security scan? → security-privacy-scanner (Agent)

Conflict Resolution

security vs axiom-build: When build fails with signing errors:

security vs shipping: When preparing for App Store:

security vs axiom-data: When storing sensitive data:

security vs axiom-networking: When securing network communication:

Critical Patterns

Keychain (skills/keychain.md):

Keychain API (skills/keychain-ref.md):

Keychain Diagnostics (skills/keychain-diag.md):

CryptoKit (skills/cryptokit.md):

CryptoKit API (skills/cryptokit-ref.md):

Passkeys (skills/passkeys.md):

App Attest (skills/app-attest.md):

Agentic Security (skills/agentic-security.md):

File Protection (skills/file-protection-ref.md):

Code Signing (skills/code-signing.md):

Code Signing Diagnostics (skills/code-signing-diag.md):

Code Signing CLI (skills/code-signing-ref.md):

Automated Scanning

Security audit → Launch security-privacy-scanner agent (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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.