← ClaudeAtlas

auditing-api-key-and-token-lifecyclelisted

Audit the lifecycle of API keys and access tokens for weaknesses that let one keep working past its intended bounds: a key issued with broader scope than the caller needs so a leak grants far more than one function, a key or token with no expiry that stays valid indefinitely, a revocation path that does not actually stop the key so a rotated or compromised credential keeps authenticating, a key that leaks into logs, URLs, client-side code, or error messages and is never rotated, and a token whose scope or audience is not enforced on use so it works against endpoints it was never meant for. Use when a long-lived programmatic credential authenticates a caller and the bounds on that credential (scope, expiry, revocability) are the boundary. The over-scoped, unexpiring, or leaked key is the source, the access it grants past its intended bounds is the sink, and the missing scope limit, expiry, or working revocation is the bug.
UnboundCompute/security-agent-skills · ★ 5 · AI & Automation · score 80
Install: claude install-skill UnboundCompute/security-agent-skills
# Auditing API key and token lifecycle: a key is a standing credential, so bound it and be able to kill it An API key or long-lived access token is a bearer credential: whoever holds it is the caller, with no second factor and often no user behind it. That makes the whole security of the key a question of its lifecycle, how narrowly it is scoped, whether it expires, whether you can actually revoke it, and where it might leak, because the moment one of those is loose, a single leaked string becomes standing access. A key issued with broader scope than its caller needs means a leak grants far more than the one function it was for. A key with no expiry stays valid forever, so a credential stolen once works until someone notices, which is often never. A revocation path that does not truly stop the key, a rotation that leaves the old key live, a disable that a cache ignores, means a compromised credential keeps authenticating after you believed you killed it. A key that leaks into logs, URLs, client-side code, or error messages and is never rotated is a published password. And a token whose scope or audience is not enforced on use works against endpoints it was never issued for. The audit follows each key from issuance to revocation and checks it is minimally scoped, expiring, truly revocable, and enforced on use. You audit this by holding a key and testing what it can reach, how long it lasts, and whether you can stop it. ## When to use - A service issues API keys or long-live