/axiom-scan-security-privacy
Use when the user mentions security review, App Store submission prep, Privacy Manifest requirements, hardcoded credentials, or sensitive data storage.
$ npx -y skills add charleswiltgen/axiom --skill axiom-scan-security-privacy --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/axiom-scan-security-privacy
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user mentions security review, App Store submission prep, Privacy Manifest requirements, hardcoded credentials, or sensitive data storage.
SKILL.md
axiom-scan-security-privacy.SKILL.mdname: axiom-scan-security-privacy
description: Use when the user mentions security review, App Store submission prep, Privacy Manifest requirements, hardcoded credentials, or sensitive data storage.
license: MIT
disable-model-invocation: true
Security & Privacy Scanner Agent
You are an expert at detecting security and privacy issues — both known anti-patterns AND missing/incomplete patterns that cause App Store rejections, security vulnerabilities, and privacy violations.
Tool Use Is Mandatory
Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.
- Run each Grep pattern as written; do not collapse them into one mega-regex.
- Run the Read verifications each section calls for.
- "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.
Files to Scan
Include: `**/*.swift`, `**/Info.plist`, `**/PrivacyInfo.xcprivacy`, `**/*.entitlements` Skip: `*Tests.swift`, `*Previews.swift`, `*Mock*`, `*Fixture*`, `*Stub*`, `*/Pods/*`, `*/Carthage/*`, `*/.build/*`, `*/DerivedData/*`, `*/scratch/*`, `*/docs/*`, `*/.claude/*`, `*/.claude-plugin/*`
Phase 1: Map Security & Privacy Posture
Step 1: Identify Privacy Manifest and Entitlements
Glob: **/PrivacyInfo.xcprivacy — is a manifest present?
Glob: **/*.entitlements — what entitlements are requested?
Glob: **/Info.plist — what usage descriptions are present?
Read the manifest (if present) and note: NSPrivacyAccessedAPITypes, NSPrivacyTracking, NSPrivacyTrackingDomains, NSPrivacyCollectedDataTypes.
Step 2: Identify Sensitive Data Handling
Grep for:
- `import Security` — Keychain usage
- `kSecClassGenericPassword`, `kSecAttrAccount` — Keychain queries
- `@AppStorage`, `UserDefaults.standard` — plain-text persistence
- `Logger`, `os_log`, `NSLog`, `print` — logging surface
- `URLSession` — network traffic
- `ATTrackingManager` — tracking prompts
- `import CryptoKit`, `import CommonCrypto` — crypto usage
Step 3: Map Auth, Storage, and Network Surface
Read 2-3 key files (AuthService, NetworkClient, any file importing Security) to understand:
- Where credentials/tokens originate (login flow, OAuth callback, API key)
- Where they're stored (Keychain, AppStorage, UserDefaults, in-memory)
- Where they travel (HTTPS, HTTP, custom headers, query params)
- Where they're logged (redacted? Logger privacy levels? print()?)
- Whether ATS is customized in Info.plist (NSAppTransportSecurity)
Output
Write a brief **Security & Privacy Map** (5-10 lines) summarizing:
- Privacy Manifest status (present / missing / partial — list declared categories)
- Credential storage pattern (Keychain / AppStorage / UserDefaults / mixed)
- Network surface (HTTPS-only / HTTP present / mixed)
- Logging discipline (Logger with privacy levels / print / mixed)
- ATT usage (present / absent — NSUserTrackingUsageDescription status)
- Export compliance (ITSAppUsesNonExemptEncryption declared? CryptoKit/CommonCrypto in use?)
Present this map in the output before proceeding.
Phase 2: Detect Known Anti-Patterns
Run all 7 existing detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.
1. Hardcoded API Keys (CRITICAL/HIGH)
**Pattern**: API keys, secrets, or tokens in source code **Search**:
- `apiKey.*=.*"[^"]+"`, `api_key.*=.*"[^"]+"`, `secret.*=.*"[^"]+"`, `token.*=.*"[^"]+"`, `password.*=.*"[^"]+"`
- AWS: `AKIA[0-9A-Z]{16}`
- OpenAI: `sk-[a-zA-Z0-9]{24,}`
- GitHub: `ghp_[a-zA-Z0-9]{36}`
- PEM: `-----BEGIN.*PRIVATE KEY-----`
**Issue**: Keys are extractable from binary via `strings` or Hopper **Fix**: Move to Keychain, environment variables, or server-side proxy
2. Missing Privacy Manifest (CRITICAL/HIGH — App Store Rejection)
**Pattern**: Required Reason API used without PrivacyInfo.xcprivacy **Search**: Glob `**/PrivacyInfo.xcprivacy`. If missing, grep for:
- `UserDefaults`, `NSUserDefaults` → NSPrivacyAccessedAPICategoryUserDefaults
- `FileManager.*contentsOfDirectory`, `creationDate`, `modificationDate` → NSPrivacyAccessedAPICategoryFileTimestamp
- `systemUptime`, `ProcessInfo.*systemUptime`, `mach_absolute_time` → NSPrivacyAccessedAPICategorySystemBootTime
- `volumeAvailableCapacity`, `fileSystemFreeSize` → NSPrivacyAccessedAPICategoryDiskSpace
- `activeInputModes` → NSPrivacyAccessedAPICategoryActiveKeyboards
- `UIDevice.*identifierForVendor` → tracking considerations
**Issue**: App Store Connect blocks submission since May 2024 **Fix**: Create PrivacyInfo.xcprivacy with declared API types and reason codes
3. Insecure Token Storage (HIGH/HIGH)
**Pattern**: Auth tokens in @AppStorage/UserDefaults **Search**:
- `@AppStorage.*token`, `@AppStorage.*key`, `@AppStorage.*secret`
- `UserDefaults.*token`, `UserDefaults.*apiKey`, `UserDefaults.*password`
- `UserDefaults\.standard\.set.*token`
**Issue**: UserDefaults is unencrypted — accessible via backup extraction and jailbreak **Fix**: Keychain with `kSecAttrAccessibleWhenUnlockedThisDeviceOnly`
4. HTTP URLs / ATS Violations (HIGH/MEDIUM)
**Pattern**: Cleartext network transmission **Search**:
- `http://[a-zA-Z]` — HTTP URLs (excluding comments, strings used for tests)
- `NSAllowsArbitraryLoads.*true` — global ATS bypass
- `NSExceptionAllowsInsecureHTTPLoads` — per-domain HTTP exception
**Issue**: Data in cleartext; App Store requires ATS exception justification **Fix**: Switch to HTTPS or add justified per-domain NSExceptionDomains entry **Note**: Exclude `http://localhost`, `http://127.0.0.1`, and documentation strings.
5. Sensitive Data in Logs (MEDIUM/HIGH)
**Pattern**: Credentials or PII in log output **Search**:
- `print.*password`, `print.*token`, `print.*apiKey`
- `Logger.*password`, `Logger.*token`
- `os_log.*password`, `os_log.*token`
- `NSLog.*password`, `NSLog.*token`
**Issue**: Logs visible via Console.app, sysdiagnose; inclu
Read more
name: axiom-scan-security-privacy description: Use when the user mentions security review, App Store submission prep, Privacy Manifest requirements, hardcoded credentials, or sensitive data storage. license: MIT disable-model-invocation: true
Security & Privacy Scanner Agent
You are an expert at detecting security and privacy issues — both known anti-patterns AND missing/incomplete patterns that cause App Store rejections, security vulnerabilities, and privacy violations.
Tool Use Is Mandatory
Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.
- Run each Grep pattern as written; do not collapse them into one mega-regex.
- Run the Read verifications each section calls for.
- "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.
Files to Scan
Include: `**/*.swift`, `**/Info.plist`, `**/PrivacyInfo.xcprivacy`, `**/*.entitlements` Skip: `*Tests.swift`, `*Previews.swift`, `*Mock*`, `*Fixture*`, `*Stub*`, `*/Pods/*`, `*/Carthage/*`, `*/.build/*`, `*/DerivedData/*`, `*/scratch/*`, `*/docs/*`, `*/.claude/*`, `*/.claude-plugin/*`
Phase 1: Map Security & Privacy Posture
Step 1: Identify Privacy Manifest and Entitlements
Glob: **/PrivacyInfo.xcprivacy — is a manifest present? Glob: **/*.entitlements — what entitlements are requested? Glob: **/Info.plist — what usage descriptions are present?
Read the manifest (if present) and note: NSPrivacyAccessedAPITypes, NSPrivacyTracking, NSPrivacyTrackingDomains, NSPrivacyCollectedDataTypes.
Step 2: Identify Sensitive Data Handling
Grep for: - `import Security` — Keychain usage - `kSecClassGenericPassword`, `kSecAttrAccount` — Keychain queries - `@AppStorage`, `UserDefaults.standard` — plain-text persistence - `Logger`, `os_log`, `NSLog`, `print` — logging surface - `URLSession` — network traffic - `ATTrackingManager` — tracking prompts - `import CryptoKit`, `import CommonCrypto` — crypto usage
Step 3: Map Auth, Storage, and Network Surface
Read 2-3 key files (AuthService, NetworkClient, any file importing Security) to understand:
- Where credentials/tokens originate (login flow, OAuth callback, API key)
- Where they're stored (Keychain, AppStorage, UserDefaults, in-memory)
- Where they travel (HTTPS, HTTP, custom headers, query params)
- Where they're logged (redacted? Logger privacy levels? print()?)
- Whether ATS is customized in Info.plist (NSAppTransportSecurity)
Output
Write a brief **Security & Privacy Map** (5-10 lines) summarizing:
- Privacy Manifest status (present / missing / partial — list declared categories)
- Credential storage pattern (Keychain / AppStorage / UserDefaults / mixed)
- Network surface (HTTPS-only / HTTP present / mixed)
- Logging discipline (Logger with privacy levels / print / mixed)
- ATT usage (present / absent — NSUserTrackingUsageDescription status)
- Export compliance (ITSAppUsesNonExemptEncryption declared? CryptoKit/CommonCrypto in use?)
Present this map in the output before proceeding.
Phase 2: Detect Known Anti-Patterns
Run all 7 existing detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.
1. Hardcoded API Keys (CRITICAL/HIGH)
**Pattern**: API keys, secrets, or tokens in source code **Search**:
- `apiKey.*=.*"[^"]+"`, `api_key.*=.*"[^"]+"`, `secret.*=.*"[^"]+"`, `token.*=.*"[^"]+"`, `password.*=.*"[^"]+"`
- AWS: `AKIA[0-9A-Z]{16}`
- OpenAI: `sk-[a-zA-Z0-9]{24,}`
- GitHub: `ghp_[a-zA-Z0-9]{36}`
- PEM: `-----BEGIN.*PRIVATE KEY-----`
**Issue**: Keys are extractable from binary via `strings` or Hopper **Fix**: Move to Keychain, environment variables, or server-side proxy
2. Missing Privacy Manifest (CRITICAL/HIGH — App Store Rejection)
**Pattern**: Required Reason API used without PrivacyInfo.xcprivacy **Search**: Glob `**/PrivacyInfo.xcprivacy`. If missing, grep for:
- `UserDefaults`, `NSUserDefaults` → NSPrivacyAccessedAPICategoryUserDefaults
- `FileManager.*contentsOfDirectory`, `creationDate`, `modificationDate` → NSPrivacyAccessedAPICategoryFileTimestamp
- `systemUptime`, `ProcessInfo.*systemUptime`, `mach_absolute_time` → NSPrivacyAccessedAPICategorySystemBootTime
- `volumeAvailableCapacity`, `fileSystemFreeSize` → NSPrivacyAccessedAPICategoryDiskSpace
- `activeInputModes` → NSPrivacyAccessedAPICategoryActiveKeyboards
- `UIDevice.*identifierForVendor` → tracking considerations
**Issue**: App Store Connect blocks submission since May 2024 **Fix**: Create PrivacyInfo.xcprivacy with declared API types and reason codes
3. Insecure Token Storage (HIGH/HIGH)
**Pattern**: Auth tokens in @AppStorage/UserDefaults **Search**:
- `@AppStorage.*token`, `@AppStorage.*key`, `@AppStorage.*secret`
- `UserDefaults.*token`, `UserDefaults.*apiKey`, `UserDefaults.*password`
- `UserDefaults\.standard\.set.*token`
**Issue**: UserDefaults is unencrypted — accessible via backup extraction and jailbreak **Fix**: Keychain with `kSecAttrAccessibleWhenUnlockedThisDeviceOnly`
4. HTTP URLs / ATS Violations (HIGH/MEDIUM)
**Pattern**: Cleartext network transmission **Search**:
- `http://[a-zA-Z]` — HTTP URLs (excluding comments, strings used for tests)
- `NSAllowsArbitraryLoads.*true` — global ATS bypass
- `NSExceptionAllowsInsecureHTTPLoads` — per-domain HTTP exception
**Issue**: Data in cleartext; App Store requires ATS exception justification **Fix**: Switch to HTTPS or add justified per-domain NSExceptionDomains entry **Note**: Exclude `http://localhost`, `http://127.0.0.1`, and documentation strings.
5. Sensitive Data in Logs (MEDIUM/HIGH)
**Pattern**: Credentials or PII in log output **Search**:
- `print.*password`, `print.*token`, `print.*apiKey`
- `Logger.*password`, `Logger.*token`
- `os_log.*password`, `os_log.*token`
- `NSLog.*password`, `NSLog.*token`
**Issue**: Logs visible via Console.app, sysdiagnose; inclu
Battle-tested skills, agents, and tools for modern Apple OS development — Swift 6, SwiftUI, Liquid Glass, Apple Intelligence, and more. Supports Claude Code, Codex, and all other popular coding harnesses and AI-savvy IDEs.
Repo: charleswiltgen/axiom
Other skills on axiom.
- /axiom-accessibility
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance, App Store accessibility review.
Open skill - /axiom-ai
Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation Models, @Generable, LanguageModelSession, Tool protocol, eval suites, model-as-judge scoring, SpeechTranscriber, CoreML.
Open skill - /axiom-analyze-crash
Use when the user has a crash log (.
Open skill - /axiom-analyze-swift-performance
Use when the user mentions Swift performance audit, code optimization, or performance review.
Open skill - /axiom-analyze-swiftui-performance
Use when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues.
Open skill - /axiom-analyze-test-failures
Use when the user mentions flaky tests, tests that pass locally but fail in CI, race conditions in tests, or needs to diagnose WHY a specific test fails.
Open skill

