/security-agent-skills:hunting-ios-keychain-and-data-protection-gapsfrom security-agent-skills
Hunts iOS keychain and data-protection gaps where secrets are stored with weaker accessibility or protection classes than needed, exposing them when the device is locked, in backups, or after theft.
Ships in security-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
iOS gives every stored secret a protection class that decides when and where it can be read: a keychain item has an accessibility attribute, and a file has a data-protection class, and together they say whether the value is available only after the user unlocks the device, whether it is bound to this device alone, and whether it leaves in a backup. Those classes are safe only when each secret carries the strictest one it can tolerate. The gap is a secret stored under a class weaker than it needs: a token marked always-accessible that can be read while the device is locked, a credential not restricted to this device that migrates in a backup to another one, or a file whose protection class lets it be read outside an unlocked session. The bug is not that the secret is stored; it is a protection class that exposes it in a context, locked, backed up, migrated, or post-theft, where it should be unreadable. You hunt these by listing every stored secret and checking the protection class against the context it must survive.
Hunt at-rest protection gaps only on apps and devices you own or are authorized to assess, on test devices and accounts, proving a secret is recoverable in the weaker context without using it against a real account. A recovered secret authenticates as its owner, so keep every probe within scope and treat recovered material as sensitive. If you can't name the authorization, stop.
Establish the protection class each secret actually carries and the context it must survive first. For each stored secret, determine its keychain accessibility or file data-protection class and the strongest context it needs to resist: locked-device read, backup inclusion, migration to another device, or post-theft access. This is the false-positive killer: a secret stored with the strictest class it can tolerate, available only when unlocked and bound to this device, is not exposed even though it exists on disk. Name the class and the context before claiming a gap.
Enumerate stored secrets and their storage. List the credentials, tokens, keys, and sensitive values the app stores, and for each whether it is in the keychain or a file, and the accessibility or data-protection class assigned. Secrets whose class is looser than the strictest they can tolerate are the candidates.
Check the locked-device availability. Determine whether a secret marked available while the device is locked, or with a file class readable outside an unlocked session, can be read without the user unlocking. A secret needed only while the app is in active use should not be available when the device is locked.
Check the this-device and backup restrictions. Determine whether a secret lacks the this-device-only restriction, so it migrates to another device through a backup or transfer, and whether it is included in backups at all. A secret bound to the hardware should never appear on another device.
Check the post-theft and other-app reach. Determine whether the weaker class lets the secret be read by an attacker with physical possession of a locked device, or through a backup an attacker can obtain, or by another app sharing an access group it should not. The context that matters is the one the attacker actually has.
Confirm and record. Confirm by recovering a usable secret in the weaker context on a test device, read
while locked, extracted from a backup, or present after migration, without using it against a real account.
Kill the lead if every secret carries the strictest class it can tolerate, if none is available while
locked or in a backup beyond its need, and if none migrates off the device. Record the secret, its
protection class, the context it was recovered in, and the proof, or set a kill_reason.
Confirm. An app stores a long-lived authentication token in the keychain marked available regardless of lock state and without the this-device-only restriction. The token is read from a locked test device and is also present after restoring a backup to a second device, recovered without using it against a real account. Confirmed at-rest secret exposure through a weak keychain accessibility class,
high, remediation = store the token with an accessibility class available only when the device is unlocked and restricted to this device, exclude it from backups, and scope the keychain access group to the app alone.Kill. The same token is stored with an accessibility class available only after first unlock while unlocked, restricted to this device, excluded from backups, and in an access group private to the app. It cannot be read on a locked device, does not appear after restoring a backup to another device, and no other app can reach it. Killed,
kill_reason= "the token carries the strictest class it can tolerate, unlocked-only and this-device-only, is excluded from backups, and is privately scoped; no read in a weaker context recovers it."
You need every stored secret with its keychain accessibility or file data-protection class, its this-device and backup status, and its access group, plus the strictest context each secret must survive. For each, decide whether the class exposes it while locked, in a backup, after migration, or to another app. Reading the assigned classes settles most leads; recovering a usable secret in the weaker context on a test device, while locked, from a backup, or after migration, settles the rest.
hunting-mobile-secret-and-storage-exposure - the cross-platform secret-at-rest hunt, of which the iOS
keychain and data-protection classes here are the platform-specific mechanism.auditing-mobile-biometric-and-local-auth-bypass - a keychain item gated by biometric presence relies on
the local-authentication check that skill audits, so protection class and auth gate meet on the same item.auditing-ios-app-group-and-pasteboard-exposure - a secret shared through an app group or the pasteboard
leaves the keychain's protection, the adjacent exposure that skill covers.auditing-mobile-root-jailbreak-and-tamper-resistance - a jailbroken device weakens the platform guarantees
these classes rely on, the environment that skill audits.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ios-security, keychain, data-protection, secret-storage, mobile-security
npx claudepluginhub unboundcompute/security-agent-skills --plugin security-agent-skills194 skills in this plugin
/adjudicating-dependency-cve-reachabilityDecide whether a CVE in a dependency actually exposes your application before you scramble to patch: is the vulnerable function on a real call path from your code, do the trigger preconditions hold, and can an attacker control the input that reaches it. Use when an advisory, SCA scan, or dependency bot flags a CVE and you must separate a genuine exposure from unreachable noise, or justify why you are or are not affected. Covers pinning the vulnerable symbol, call-path reachability, precondition checks, and taint from your entry points./adjudicating-taint-pathsDecide whether a whitebox lead is a real bug by tracing taint from an untrusted source to a dangerous sink and confirming every hop against live source. Use after a scanner, a candidate list, or your own reading surfaces a "this looks dangerous" sink (SQL exec, system/exec, file open, deserialize, template render, redirect target, memcpy) and you must decide whether attacker- controlled input actually reaches it - or kill the lead with evidence. Covers forward and reverse taint, witness paths, sanitizer analysis, and the evidence rules that separate a finding from a false positive./auditing-account-abstraction-and-paymaster-trustAudit an ERC-4337 account-abstraction deployment for trust misplaced in the user-operation lifecycle: a smart account whose validation accepts a signature or nonce it should reject, a paymaster that agrees to sponsor gas for operations it should not so an attacker drains its deposit, a bundler or entry-point assumption that lets a user operation be replayed or reordered for gain, and validation logic that reads mutable state or reaches outside its allowed scope. Covers smart-contract wallets, paymasters, bundlers, and the entry point in an account-abstraction stack where a user operation is validated and sponsored before it executes. Use when a user operation is validated, paid for, and executed by separate parties and that trust split is the boundary. The crafted user operation is the source, the drained paymaster or unauthorized execution is the sink, and the over-permissive validation or sponsorship rule is the bug./auditing-account-recovery-and-reset-trustAudit password reset and account recovery flows for the trust that lets an attacker take over an account: a reset token that is guessable, long-lived, reusable, or not bound to the account it was issued for, a recovery path that verifies a weaker factor than login and bypasses multi-factor, a reset link whose host comes from an attacker-controllable header so the token leaks, and a recovery that trusts an unverified email or phone change to redirect the reset. Covers the recovery surface of authentication systems, where resetting a credential or recovering access is the alternate door into an account. Use when an application offers password reset or account recovery and that flow is a path to authentication. The attacker-driven recovery request is the source, the account it takes over is the sink, and the weak token, bypassed factor, or leaked reset link that grants it is the bug./auditing-admission-control-policy-gapsAudit cluster admission control for gaps that let a non-compliant or hostile workload through: a validating webhook that fails open when its backend is unreachable, a policy that scopes by namespace or label and misses the namespaces that matter, a mutating webhook whose changes are trusted downstream, and an ordering or exemption that lets a privileged pod bypass the checks meant to stop it. Covers Kubernetes admission webhooks and policy engines that are supposed to enforce workload security at create and update time. Use when admission policies are the control that keeps privileged, unsigned, or over-permissioned workloads out of the cluster. The workload submitted for admission is the source, the admitted resource is the sink, and the policy gap that let it through is the bug./auditing-ai-agent-permissionsAudit what an AI agent is actually allowed to do versus what its task needs. Covers excessive agency (tools, scopes, and autonomy beyond the job), missing human-in-the-loop gates on irreversible actions, over-broad credentials and their blast radius, sandbox and code-interpreter escape, unfiltered egress, and unbounded resource or spend (denial-of-wallet). Use when granting an agent a tool or scope, reviewing an agent's permission posture, or deciding which actions need approval. The model's restraint is not a control; permissions are.Other plugins' skills for the same job