/agentic-security:security-rotate-leakfrom agentic-security
Rotates a leaked secret end-to-end. Detects provider from key prefix, prints exact revoke URL, estimates blast radius, and optionally runs automated rotation with git history scrubbing.
Ships in agentic-security. 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.
Activates when the user has discovered (or you've discovered) that a production credential is in the repo, the chat, or git history. The clock is running — every hour the value sits exposed is another hour an attacker has to find it.
ai-bodyguard hook) just flagged a hardcoded secret./scan --secrets run produces a critical-severity hit.DO NOT print the leaked value back. Mask it to first-4 + last-4 chars in any output. The chat transcript itself becomes part of the blast radius.
Detect the provider from the prefix:
sk_live_…, rk_live_… → Stripesk-…, sk-proj-… → OpenAIsk-ant-… → Anthropicghp_…, github_pat_… → GitHub PATxoxb-…, xoxa-…, xoxp-… → SlackAKIA… → AWS access key (16 chars after prefix)AIza… → Google API keyrole: service_role claim → Supabase service-roletype: "service_account") → GCPPrint the EXACT revoke URL for that provider's console. Don't paraphrase — copy from this canonical list:
| Provider | Revoke at |
|---|---|
| OpenAI | https://platform.openai.com/api-keys |
| Anthropic | https://console.anthropic.com/settings/keys |
| GitHub PAT | https://github.com/settings/tokens |
| Slack | https://api.slack.com/apps → your app → OAuth & Permissions → Revoke |
| AWS access key | https://console.aws.amazon.com/iam/home#/security_credentials |
| Google API key | https://console.cloud.google.com/apis/credentials |
| Supabase service-role | https://supabase.com/dashboard/project/_/settings/api |
| GCP service account | https://console.cloud.google.com/iam-admin/serviceaccounts |
| Stripe | https://dashboard.stripe.com/apikeys |
Estimate blast radius BEFORE the rotation, not after:
audit_log table for anomalous reads since the value first appeared.Run the active rotation if the user agrees:
/fix --rotate-secret --auto. This is the only command that touches the
provider's API for you. Without --auto, surface the manual steps
and stop.
Add --scrub-history if the value is in git history. Rewrites
history via git filter-repo or BFG. Note: irreversible, requires
force-push to a shared branch — do NOT run without explicit user
confirmation.
Propose the next step: /fix --vault to migrate the rest of
the project's env-var surface to a real secrets manager so this
doesn't happen again.
--scrub-history without explicit confirmation. It's
irreversible and breaks every clone of the repo..env or push it via the deployment platform's CLI./fix --rotate-secret — guided rotation steps for the detected provider/fix --rotate-secret --auto — end-to-end (revoke + scrub + push replacement)/fix --rotate-secret --auto --scrub-history — also purge from git history/fix --vault — migrate to Doppler / Infisical / platform secretsWhat SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/add-scan-ruleagentic-security:add-scan-ruleWalk through the six-step recipe for adding a new SAST detector — pick the module, export scan*(), wire, fixture, test./privacy-data-flowagentic-security:privacy-data-flowPrivacy review before handling user data. Activate on PII/PHI/PCI shapes (email, SSN, CC, MRN). Writes DATA_FLOW.md./secure-coding-guardagentic-security:secure-coding-guardGuard risky writes. Activate before eval/exec, string-concat SQL, md5/sha1/DES/RC4 crypto, or auth/jwt/oauth/cipher./security-explainagentic-security:security-explainExplain or teach a vuln. Activate on a CVE/GHSA id, "what is this vuln", "explain finding", or a Socratic walkthrough./security-fix-findingagentic-security:security-fix-findingApply a remediation patch via the deterministic MCP toolchain. Activate when user asks to fix a scanner finding./security-scan-on-deployagentic-security:security-scan-on-deployRun the security scanner. Activate on ship / deploy / launch / "is this safe?" — before the deploy happens.npx claudepluginhub clear-capabilities/agentic-security --plugin agentic-securityOther plugins' skills for the same job