AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Swift Security Pro

skill-laxrajpurohit-swift-skills-pro-swift-security-pro · by laxrajpurohit

Use when handling sensitive data on iOS — Keychain storage, Data Protection, ATS/TLS, secrets management, and biometric (Face ID / Touch ID) authentication.

No reviews yet
0 installs
11 views
0.0% view→install

Install

$ agentstack add skill-laxrajpurohit-swift-skills-pro-swift-security-pro

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-laxrajpurohit-swift-skills-pro-swift-security-pro)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Swift Security Pro? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Swift Security Pro

Protect user data and credentials. Default to the most secure option.

When to use

  • Storing tokens, passwords, or sensitive data.
  • Reviewing networking, secrets handling, or auth.
  • Adding biometric authentication.

Trigger: /swift-security-pro.

Core principles

  • Secrets go in the Keychain, never UserDefaults or plist.
  • Never hard-code API keys/secrets in source.
  • Keep App Transport Security on; require TLS.
  • Use biometrics for gating access, not for storing the secret itself.

Storing secrets

❌ UserDefaults — plaintext, backed up, readable

UserDefaults.standard.set(token, forKey: "authToken")

✅ Keychain

let query: [String: Any] = [
    kSecClass as String: kSecClassGenericPassword,
    kSecAttrAccount as String: "authToken",
    kSecValueData as String: Data(token.utf8),
    kSecAttrAccessible as String: kSecAttrAccessibleWhenUnlockedThisDeviceOnly
]
SecItemDelete(query as CFDictionary)
SecItemAdd(query as CFDictionary, nil)

Use ...ThisDeviceOnly accessibility so secrets don't migrate via backup.

No hard-coded secrets

let apiKey = "sk_live_abc123"   // shipped in the binary, easily extracted

  • Inject at build time (xcconfig / CI secret) or fetch from your backend.
  • Never commit keys; add config files to .gitignore.
  • Treat anything in the app bundle as public.

Transport security

  • Keep ATS enabled. Don't add NSAllowsArbitraryLoads.
  • Use HTTPS everywhere; consider certificate pinning for high-value APIs via

URLSessionDelegate urlSession(_:didReceive:completionHandler:).

❌ Info.plist

NSAppTransportSecurity
  NSAllowsArbitraryLoads

✅ Leave ATS on; scope rare exceptions to a specific domain only.

Data Protection

Mark sensitive files so they're encrypted at rest while locked:

try data.write(to: url, options: .completeFileProtection)

Biometric auth

import LocalAuthentication
let ctx = LAContext()
var error: NSError?
if ctx.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error) {
    let ok = try await ctx.evaluatePolicy(
        .deviceOwnerAuthenticationWithBiometrics,
        localizedReason: "Unlock your vault")
}

Biometrics gate access; the actual secret still lives in the Keychain (optionally with SecAccessControl requiring biometry). Always provide a passcode fallback.

Common mistakes checklist

  • [ ] Tokens/passwords in UserDefaults or a plist.
  • [ ] Hard-coded API keys/secrets in source or the bundle.
  • [ ] NSAllowsArbitraryLoads / disabled ATS.
  • [ ] Keychain items without ...ThisDeviceOnly for non-syncable secrets.
  • [ ] Logging tokens / PII to the console.
  • [ ] Treating biometric success as the secret instead of gating Keychain access.

Output format (when reviewing)

Per issue: file:line, the exposure, before/after fix. Lead with credential leaks and plaintext storage.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.