secrets-incident-response

Rotates leaked credentials, audits usage across the exposure window, and purges git history.

1|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/Nandansai08/skillz --skill secrets-incident-response-nandansai08
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: secrets-incident-response
Source: https://github.com/Nandansai08/skillz/tree/main/skills/security/secrets-incident-response
Command: npx skills add https://github.com/Nandansai08/skillz --skill secrets-incident-response-nandansai08

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? A leaked credential — committed to git, pasted in chat, or exposed in logs — is compromised from the moment of exposure, and ad-hoc responses (deleting the commit, delaying rotation) leave the breach unaudited and the secret live. This Skill provides a rotate-first incident playbook that contains the leak, determines whether it was exploited, and fixes the systemic gaps that allowed it. ## Core Features & Use Cases - Rotate-first playbook: Issues a new credential, cuts over consumers, then revokes the old one using two-key overlap to avoid self-inflicted outages. - Usage audit and blast-radius assessment: Pulls provider audit logs (CloudTrail, GitHub token audit, Stripe/Twilio dashboards) across the documented exposure window and maps what the credential could reach, including secondary credentials it could mint. - History purge and sibling scan: Rewrites git history with git filter-repo after the audit completes, then runs gitleaks or trufflehog to find companion secrets. - Use Case: GitHub secret scanning flags an AWS key pushed to a public repo 33 minutes ago. Follow the playbook to rotate the key, discover four unauthorized API calls in CloudTrail, escalate to a full incident, rotate a reachable database password, and ship push protection org-wide. ## Quick Start Respond to my leaked credential incident: an API key was committed to a public git repository, walk me through rotation, usage audit, and history cleanup.

Frequently Asked Questions about secrets-incident-response

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What should I do first when an API key is committed to git?▼

Rotate the credential immediately — issue a new key, cut over consumers, then revoke the old one. Deleting the commit is hygiene, not remediation, because public-repo secrets are harvested by bots within minutes of exposure.

How do I remove a secret from git history?▼

Use git filter-repo with a replace-text rule to redact the leaked value, then force-push with --force-with-lease after coordinating with the team. Note that GitHub caches commits by SHA, forks retain copies, and purging must happen only after rotation and the usage audit.

Should I revoke a leaked credential immediately or rotate first?▼

Rotate first using two-key overlap: issue the new credential, cut over, then revoke the old one to avoid self-inflicted outages. Revoke immediately only when active exploitation is observed and the outage is acceptable.

How do I check if a leaked AWS key was used by an attacker?▼

Pull CloudTrail logs for the key across the exposure window and look for calls from unfamiliar IPs or regions, or any calls if the key was dormant. Any unauthorized use escalates the leak to a full breach incident with possible disclosure obligations.

When is deleting the leaked commit enough without rotation?▼

Never — exposure windows are measured by automated scanners, not human attention, and the value persists in reflogs, forks, and scraper databases. Rotation is the only remediation; deletion is post-rotation hygiene.