Skillshub ios-security
Standards for Keychain, Biometrics, and Data Protection. Use when implementing Keychain storage, Face ID/Touch ID, or data protection in iOS. (triggers: **/*.swift, SecItemAdd, kSecClassGenericPassword, LAContext, LocalAuthentication)
install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/HoangNguyen0403/agent-skills-standard/ios-security" ~/.claude/skills/comeonoliver-skillshub-ios-security && rm -rf "$T"
manifest:
skills/HoangNguyen0403/agent-skills-standard/ios-security/SKILL.mdsource content
iOS Security Standards
Priority: P0 (CRITICAL)
Implementation Guidelines
Key Storage
- Keychain: Use for Auth tokens, passwords, and PII. Never store in
.UserDefaults - SecItem API: Use
,SecItemAdd
, andSecItemUpdate
for persistent secure storage. UseSecItemDelete
for tokens.kSecClassGenericPassword - Biometrics: Use
for Face ID or Touch ID. UseLocalAuthentication
and verify availability withLAContext
before evaluation.canEvaluatePolicy
Data Protection
- File Encryption: Use
when saving files to disk.Data.WritingOptions.completeFileProtection - App Sandboxing: Respect the sandbox; do not attempt to access files outside of your container.
- Sensitive Data: Avoid storing PII in unprotected files.
Network Security
- ATS: Don't disable App Transport Security (ATS) globally in
. In-transport encryption is mandatory.Info.plist - SSL Pinning: Use ServerTrustManager or TrustKit for backend-critical applications to prevent MITM attacks.
Anti-Patterns
- No secrets in UserDefaults: Always use Keychain.
- No unhandled LAError: Check for userCancel, authenticationFailed, etc.
- No PII/token logging: Ensure sensitive logs are stripped in Release builds.
References
Related Topics
- common/security-standards
- architecture