ios-security — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited ios-security (Agent Skill) and scored it 45/100 (orange). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 1 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
A base64 string of 128+ characters appears in a documentation file. Encoded prompt injection hides the hostile instruction in base64 — invisible to keyword filters — and relies on the agent's ability to decode it at runtime. There is no normal authoring reason to embed a multi-hundred-byte base64 blob in skill docs.
*.sig, SIGNATURES) outside the documentation.Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Production-grade security auditing skill for iOS codebases aligned with OWASP MASVS v2.1.0. Operates pattern-first — high-confidence string/regex detection for CRITICAL issues, then semantic reasoning for HIGH/MEDIUM issues requiring data-flow understanding. Covers both Swift and Objective-C with language-appropriate detection strategies.
The audit produces a structured finding report with severity, location, MASVS mapping, risk explanation, and concrete fix. Every finding links to a MASVS control and, where applicable, a MASWE weakness ID.
MASVS v2.1.0 — 8 Categories, 24 Controls
├── STORAGE (2) — Keychain, Data Protection, leakage vectors
├── CRYPTO (2) — Algorithms, key management, randomness
├── AUTH (3) — Protocol, local auth, step-up
├── NETWORK (2) — ATS/TLS, certificate pinning
├── PLATFORM (3) — URL schemes, WebViews, UI security
├── CODE (4) — Platform version, updates, deps, input validation
├── RESILIENCE (4) — Integrity, tampering, static/dynamic analysis
└── PRIVACY (4) — Minimization, transparency, control, lifecycleIs the issue exploitable without physical device access?
├── YES → Is sensitive data (credentials, PII, keys) exposed?
│ ├── YES → 🔴 CRITICAL
│ └── NO → 🟡 HIGH
└── NO → Does the issue weaken defense-in-depth?
├── YES → 🟢 MEDIUM
└── NO → 🔵 LOWDoes the file use Objective-C (.m, .mm, .h with ObjC)?
├── YES → Apply ObjC runtime checks (swizzling, KVC, format strings)
│ AND standard checks → Read references/objc-specific.md
└── NO → Pure Swift?
├── YES → Apply Swift-specific patterns (CryptoKit, actors)
└── NO → Mixed — apply BOTH checklists per file typeDoes the app handle financial, health, government, or payment data?
├── YES → L2 audit: encryption mandatory, pinning required,
│ compliance mapping needed → Read references/compliance-mapping.md
└── NO → Does the app store any PII?
├── YES → L1+ audit: standard + privacy controls
└── NO → L1 audit: standard security controlsscripts/quick-scan.sh locally (whole-repo grep, zero tokens, deterministic) AND use your own search tools to scan for CRITICAL patterns. The script catches literals across every file regardless of depth; agent search catches patterns requiring multi-file context or semantic understanding. Neither alone is sufficient.references/plist-audit.mdreferences/objc-specific.mdreferences/compliance-mapping.mdreferences/appstore-rejections.mdreferences/audit-workflow.md### [SEVERITY] [Short title]
**File:** `path/to/file.swift:42`
**MASVS:** MASVS-[CATEGORY]-[N] | MASWE-[NNNN]
**Issue:** [1-2 sentence description of the vulnerability]
**Risk:** [What an attacker can achieve]
**Fix:**// ✅ Secure replacement code
For complete patterns with code pairs, read references/critical-patterns.md| # | Pattern | Search for |
|---|---|---|
| C1 | Hardcoded secrets | String literals assigned to vars named apiKey, secret, password, PRIVATE_KEY, client_secret; Bearer prefix in literals |
| C2 | Sensitive data in UserDefaults | UserDefaults.standard.set( with keys containing password/token/secret/credential/sessionId |
| C3 | Globally disabled ATS | NSAllowsArbitraryLoads = true/YES in Info.plist |
| C4 | Hardcoded crypto keys | Byte arrays or string literals used as encryption key parameters |
| C5 | Insecure deserialization | NSKeyedUnarchiver.unarchiveObject( — use unarchivedObject(ofClass:from:) |
| C6 | Hardcoded/zero IVs | Data(repeating: 0, count: or string literals used as IV/nonce |
When: User requests "security audit", "security review", or "find vulnerabilities"
#### Phase 0: Discover & Scope Gate (MANDATORY — do not skip, do not start scanning yet)
.xcodeproj/.xcworkspace — list all targets (main app, extensions, widgets, watch app)Podfile/Package.swift/Cartfile — list dependencies and count them.swift files and .m/.mm files per target separatelyOutput exactly this block (fill in real numbers from discovery):
## 🔍 iOS Security Audit — Scope Selection
**Project:** [App name]
**Targets found:** [list: MainApp (42 .swift), ShareExtension (8 .swift), ...]
**Dependencies:** [N pods / N SPM packages]
**Languages:** [Swift-only / Mixed Swift+ObjC]
### Target scope — which code to scan?
| Option | Scope | Files | Est. time | Est. tokens |
|--------|-------|-------|-----------|-------------|
| A | Main target only | ~N files | fast (~5 min) | ~15–25k |
| B | All targets (incl. extensions) | ~N files | medium (~10 min) | ~30–50k |
| C | Main target + dependencies | ~N files | slow (~20 min) | ~60–100k |
| D | Specific target (tell me which) | ? | varies | varies |
**Recommended:** A for first audit, C for supply chain review.
### MASVS depth — how thorough?
| Option | Coverage | What's included | Est. tokens (delta) |
|--------|----------|-----------------|---------------------|
| 1 | Critical only | CRITICAL patterns + Info.plist | baseline |
| 2 | Essential (recommended) | + HIGH patterns + NETWORK + AUTH | +8–12k |
| 3 | Full MASVS (all 8 categories) | + MEDIUM/LOW + RESILIENCE + PRIVACY | +15–25k |
| 4 | Full MASVS + compliance mapping | + HIPAA/PCI/GDPR gaps | +20–35k |
**Recommended:** Option 2 for most apps, Option 3 for regulated/fintech/health apps.
### Testing profile
| Option | Profile | When |
|--------|---------|------|
| L1 | Standard | General-purpose apps |
| L2 | Enhanced | Finance, health, government, payment |
| R | Resilience | Apps requiring anti-tampering/obfuscation |
**Reply with your choices, e.g.: A2L1 or B3L2**#### Phase 1: Audit (after scope confirmed)
references/critical-patterns.md — scan selected scope for CRITICAL patternsreferences/plist-audit.md — audit Info.plist and entitlementsreferences/high-patterns.md — scan for HIGH severity patternsreferences/objc-specific.mdreferences/medium-low-patterns.md — scan for defense-in-depth gapsreferences/compliance-mapping.md — HIPAA/PCI/GDPR/SOC2 gapsreferences/appstore-rejections.md — check App Store rejection risks (AS1-AS9)#### Phase 2: Report
references/audit-workflow.md—. Use the template from references/audit-workflow.md.When: User asks about a specific category — "check my crypto", "review network security", "audit storage"
references/masvs-mapping.mdWhen: User asks "is this ready for release" or "security checklist"
references/appstore-rejections.md — run App Store rejection checklist (AS1-AS9)When: User asks "how do I fix this" or "secure alternative for X"
Full audits on large codebases (500+ Swift files) consume significant tokens. Use a phased approach:
This reduces audit cost by 60-80%. See references/audit-workflow.md for detailed model-to-phase mapping.
<critical_rules>
UserDefaults.standard.set call handling sensitive data is a CRITICAL finding — recommend Keychain with kSecAttrAccessibleWhenUnlockedThisDeviceOnlyNSAllowsArbitraryLoads = true in Info.plist is CRITICAL unless every domain has a justified NSExceptionDomains entryNSKeyedUnarchiver.unarchiveObject( is CRITICAL — always recommend unarchivedObject(ofClass:from:) with requiresSecureCoding = truekCCOptionECBMode is always HIGH — ECB mode preserves plaintext patternskSecAttrAccessibleAlways and kSecAttrAccessibleAlwaysThisDeviceOnly are HIGH — deprecated since iOS 12rand(), random(), srand() in any security context are HIGH — recommend SecRandomCopyBytesUIWebView is HIGH — deprecated since iOS 12, App Store rejection since April 2020NSLog or print with variables named password/token/ssn/creditCard is HIGH — logs persist to system logLAContext.evaluatePolicy without server-side cryptographic binding is MEDIUM — biometric result is bypassableNSLog(variable) without format specifier is HIGH — format string vulnerabilitykSecAttrAccessible inherit the default (kSecAttrAccessibleWhenUnlocked) — flag as informational for L2 apps</critical_rules>
<fallback_strategies>
If unable to determine data sensitivity for UserDefaults: Ask the user what data the key stores. If the key name is ambiguous, flag as informational with a note to verify.
If Info.plist is not found: Check for multiple targets (look in each .xcodeproj target's build settings for INFOPLIST_FILE). Also check for .plist files generated by build tools.
If the codebase uses a third-party networking library: Check Alamofire's ServerTrustManager, Moya's plugins, or URLSession wrappers for pinning configuration. The absence of pinning in a wrapper doesn't mean it's missing — check the underlying configuration. </fallback_strategies>
Before finalizing the audit report, verify:
[ ] Every CRITICAL finding has been double-checked for false positives
[ ] Findings include file path, line number, and MASVS mapping
[ ] Secure code fixes compile and follow current API (no deprecated replacements)
[ ] L1 vs L2 distinction is applied — L2 controls not flagged as failures for L1 apps
[ ] Objective-C runtime checks applied only to ObjC files
[ ] Info.plist findings cross-referenced with actual code behavior
[ ] No duplicate findings for the same root cause
[ ] Summary includes total count by severity and top recommendationsIf the audit uncovers concurrency-related vulnerabilities: load the appropriate companion skill for fix patterns.
| Finding type | Companion skill | Apply when |
|---|---|---|
| TOCTOU races, token refresh races, actor double-spend | skills/swift-concurrency/SKILL.md | Fixing async security bugs, serializing token refresh with actors, TOCTOU prevention |
Data races in DispatchQueue code, unprotected shared state | skills/gcd-operations/SKILL.md | Fixing reader-writer races, adding barrier-based synchronization, thread-safe collections |
| Reference | When to Read |
|---|---|
references/rules.md | Do's and Don'ts quick reference: priority rules and critical audit anti-patterns |
references/critical-patterns.md | Every audit — CRITICAL detection patterns with vulnerable/secure code pairs |
references/high-patterns.md | Every audit — HIGH severity patterns with context requirements |
references/medium-low-patterns.md | Full audits — defense-in-depth and best practice checks |
references/objc-specific.md | When Objective-C files are present — runtime attack surface |
references/plist-audit.md | Every audit — Info.plist and entitlements security checks |
references/compliance-mapping.md | L2/regulated apps — HIPAA, PCI DSS, GDPR, SOC 2, FDA 21 CFR Part 11 requirements |
references/audit-workflow.md | Audit report template, cost optimization (Sonnet tiers), and structured remediation tracking |
references/appstore-rejections.md | Pre-release — App Store rejection patterns (UIWebView, privacy manifest, ATT, ATS, entitlements) |
references/masvs-mapping.md | Reference — MASVS control to detection pattern mapping |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.