/prodsec-skills:avoid-api-keysfrom prodsec-skills
Guides migration from API keys to short-lived OIDC bearer tokens in production AI systems. Includes credential storage rules and implementation checklist.
Ships in prodsec-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.
API keys SHOULD NOT be used in production environments. Short-lived, scoped bearer tokens issued by an identity provider are preferable.
| Issue | Impact |
|---|---|
| Long-lived | Extended exposure window if compromised |
| Difficult to rotate | Rotation requires coordination across all consumers |
| Lack fine-grained scoping | Cannot limit permissions per request or context |
| No sender binding | Any holder of the key can use it from anywhere |
| No standard revocation | No instant revocation mechanism across distributed systems |
| Poor audit trail | API keys don't carry identity claims about the caller |
Use short-lived, scoped bearer tokens from an OIDC Identity Provider:
| Property | API Key | IdP-Issued Token |
|---|---|---|
| Lifetime | Long-lived (months/years) | Short-lived (≤15 minutes) |
| Scoping | Broad or none | Per-request scopes |
| Revocation | Manual, slow | Instant via IdP + local blacklist |
| Identity | Opaque | Rich claims (sub, iss, aud, scope) |
| Rotation | Manual | Automatic via refresh tokens |
| Sender binding | None | DPoP or mTLS certificate binding |
For systems currently using API keys:
Credentials (API keys, tokens, secrets) MUST NEVER be stored in source code. This applies to all credentials including those used to connect to third-party model endpoints. Credentials must be managed and stored securely using:
What SKILL.md sets; muted values are Claude Code's defaults
130 skills in this plugin
/address-sanitizerAddressSanitizer detects memory errors during fuzzing. Use when fuzzing C/C++ code to find buffer overflows and use-after-free bugs.
/admin-interface-securitySecure the administrative interface of model registries. Use when building, deploying, or reviewing model registry access controls and admin interfaces./aflppAFL++ is a fork of AFL with better fuzzing performance and advanced features. Use for multi-core fuzzing of C/C++ projects.
npx claudepluginhub redhatproductsecurity/prodsec-skills --plugin prodsec-skillsOther plugins' skills for the same job