secrets-management-audit
Skill0 starsChanged 5 months agoMITView on GitHub
Audits how secrets (keys, tokens, passwords, certs) are stored, distributed, rotated, and exposed across a system. Use when reviewing credential handling, after a suspected leak, before an audit, or when secrets appear in code, configs, logs, or CI.
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
The blast radius of one leak: if this single credential leaks, what does it unlock?
- Very specific: line 28
Logs and telemetry: search logs/APM/error trackers for tokens, passwords, and auth headers — they leak into observability constantly.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Secrets Management Audit
A secret's lifetime of exposure, not its strength, determines the breach. A perfectly random key committed to git is worthless. Audit the full lifecycle: creation, storage, distribution, use, rotation, and revocation.
Find where secrets live (and where they leak)
- At rest: source code, config files, environment variables, container images/layers, IaC templates, CI/CD variables, and backups. Each is a place a secret gets copied and forgotten.
- In transit: how does a secret get to the service that needs it? Hardcoded, baked into the image, injected at runtime from a vault? Every hop is an exposure point.
- In flight / in use: secrets in process memory, in logs, in error messages, in URLs (query strings get logged everywhere), in client-side code (anything shipped to the browser is public).
The lifecycle controls
- Generation: high-entropy, generated by the secret manager, never human-chosen for service credentials.
- Storage: a dedicated secrets manager/vault with access control and audit logging — not env files checked into repos, not plaintext config.
- Distribution: injected at runtime via short-lived credentials or workload identity, not baked into artifacts.
- Rotation: routine and automated; the system must tolerate rotation without downtime. A secret that can't be rotated easily won't be after a leak.
- Revocation: a leaked secret must be killable immediately. Long-lived static keys with no revocation path are the worst case.
Adversarial validation
- Git history: secrets are often removed from
HEADbut live forever in history (and in every clone/fork). Removing from the latest commit is not remediation — the secret is compromised and must be rotated. - The blast radius of one leak: if this single credential leaks, what does it unlock? Over-scoped, shared, and long-lived secrets turn one leak into total compromise. Prefer least-privilege, per-service, short-lived.
- Logs and telemetry: search logs/APM/error trackers for tokens, passwords, and auth headers — they leak into observability constantly.
- Client-side exposure: any secret in a mobile app, SPA bundle, or browser is already public; treat API keys shipped to clients as identifiers, not secrets.
- CI/CD: build logs, PR-triggered workflows from forks, and over-broad pipeline tokens are a top leak vector.
Non-obvious risks
- Encryption keys protecting secrets are themselves secrets — the chain bottoms out at a root of trust (HSM/KMS); a key encrypting keys stored next to them protects nothing.
- Rotation without revoking the old value just adds a valid credential; old must be invalidated.
- "It's only internal" secrets become external the moment one internal component is breached.
Output structure
Deliver: the inventory of where each secret class lives at rest/in transit/in use, the lifecycle gaps (generation, storage, rotation, revocation), the git-history and log/telemetry leak check, the blast radius per secret with least-privilege/short-lived recommendations, and an ordered remediation list (rotate-now items first).
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- mn-youssef/security-skills★ 47same name
- JeremyMorgan/code-review-skills★ 15same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- adversarial-code-reviewSkill
- api-contract-designSkill
- attack-surface-mappingSkill
- authn-authz-design-reviewSkill
- benchmark-designSkill
- capacity-scalability-planningSkill
- concurrency-race-analysisSkill
- data-consistency-modelingSkill
- data-exfiltration-analysisSkill
- distributed-consensus-designSkill
- error-handling-architectureSkill
- event-driven-architectureSkill
- experiment-designSkill
- hypothesis-falsificationSkill
- incident-rca-postmortemSkill
- legacy-refactoring-strategySkill
- literature-synthesisSkill
- metrics-designSkill
- multi-layer-caching-strategySkill
- mvp-scope-cuttingSkill
- performance-profilingSkill
- rate-limiting-designSkill
- requirements-disambiguationSkill
- statistical-validity-analysisSkill
- supply-chain-risk-analysisSkill
- system-decomposition-synthesisSkill
- threat-modelingSkill
- tradeoff-decision-frameworkSkill
- user-failure-mode-mappingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

