secrets-audit

Installation
SKILL.md

Secrets Audit — Credential Exposure and Secrets-Management Review

Two halves: (1) find secrets that have already leaked into source, history, or artifacts, and (2) audit the secrets-management posture that determines whether future leaks happen.

Most secret leaks aren't "we forgot to redact" — they're "we never had a system, so every developer made up their own approach." This skill covers both the cleanup and the prevention.

Cross-references: dependency-audit (CI-related secrets risk in build-time exposure), iam-audit (workload identity federation as the alternative to long-lived keys), owasp-audit A04:2025 Cryptographic Failures (hard-coded secrets found during an app review), agent-supply-chain-audit (the skills, hooks, and MCP servers that sit next to these agent configs and can read them), incident-triage (its vendor-breach playbook, and the exfiltration-collector domains below as egress indicators) and threat-hunting (sweep for those domains), scanner-pipeline (gitleaks / trufflehog across full history and a whole fleet of repos, on a schedule), personal-opsec (the operator's own machine, where agent tokens and pasted secrets actually live), cicd-security (which workflows and forks can reach CI secrets).

Authorization

Scan only repositories, CI systems and machines the user owns or is authorized to audit. Remote sources (a GitHub or GitLab org, Hugging Face, a bucket) only for accounts the user owns and names here, with their own token. Never print a full secret: give the type, location, and prefix plus last four. Checking that a key is live ("Verify it's live" below) uses the key, so ask first. That includes scanners that verify: trufflehog checks every candidate with its provider unless you pass --no-verification, so no secret scanner is pre-approved. Ask, use the provider's read-only identity call, and never use a found credential to read data. Rotation and history rewrites are the owner's call and always prompt.

Part 1 — Find leaked secrets

Provider key prefixes (high-confidence patterns)

The most useful first sweep is grep against known provider key prefixes. False positives are low and matches are almost always real.

These list matching files (-l) or counts (-c) rather than printing the match, so the secret isn't copied into your terminal scrollback or an agent transcript. Use the masked rg below when you need to tell keys apart.

Installs
609
GitHub Stars
526
First Seen
May 27, 2026