Review iOS security
review_swift_securityIdentify security defects in a Swift project before shipping: hardcoded secrets, insecure data storage, disabled ATS, weak hashes, and unsafe JavaScript evaluation.
Instructions
Check a Swift project for security defects: hardcoded API keys, tokens, and passwords in source; credentials written to UserDefaults instead of the Keychain; App Transport Security disabled; cleartext http:// endpoints; TLS server trust accepted without evaluation; MD5 and SHA-1; Keychain items with over-permissive accessibility; non-cryptographic randomness used for nonces and salts; secrets written to logs; and string interpolation into evaluated JavaScript. Use before shipping, during a security review, or when handling credentials.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the Swift project root (the folder containing Package.swift or the .xcodeproj). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| score | Yes | 0-100 defect density. 100 = no findings. penalty = 10*blockers + 3*serious + 1*minor; capacity = files*10. Comparable across runs on ONE project, not between projects. | |
| counts | Yes | ||
| issues | Yes | Every finding, most severe first. | |
| summary | Yes | One-line plain-language result. | |
| suggestions | Yes | Prioritized next actions, deduplicated by rule — not a restatement of every issue's fix. | |
| files_checked | Yes | Swift files actually scanned. |