agentleFS
KhaledSaeed18KhaledSaeed18/dotclaude/skills/security/secret-scan/SKILL.md

secret-scan

Skill5 starsChanged 4 months agoMITView on GitHub

Scan code or a diff for hardcoded secrets (API keys, tokens, passwords, private keys, and other exposed credentials) before they get committed or shipped. Use before committing, during review, or when auditing a repository.

  • Reads credentials

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    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
  1. Very specific:

    Add the offending file pattern to .gitignore.

    line 27

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Find secrets that should never be in source control, then advise on remediation. Default scope: the staged diff if there is one, otherwise the working tree. Scan history or a specific path only when asked.

What to look for

  • Known credential patterns: cloud keys (AWS AKIA…, GCP, Azure), provider API tokens (Stripe, GitHub ghp_…, Slack, OpenAI, etc.), OAuth client secrets, JWTs.
  • Private keys & certs: -----BEGIN … PRIVATE KEY----- blocks, .pem / .p12 / keystore contents.
  • Credentials in URLs/config: connection strings and URLs with embedded passwords (scheme://user:pass@host), basic-auth headers.
  • Generic secrets: assignments to names like password, secret, token, api_key, access_key, client_secret, plus high-entropy strings that look like keys.
  • Risky files committed by mistake: .env, credential JSON, *.key, and their presence in history.

Reduce false positives

Distinguish real secrets from example/placeholder values (xxxxx, your-key-here, changeme), test fixtures, public keys, and sample docs. When genuinely unsure, label a finding "review" rather than asserting a leak, but err toward reporting over silence.

Report and remediate

For each finding give: the file and line, the kind of secret, and a confidence (high / review). Then recommend remediation:

  • Rotate the credential immediately. Assume anything committed (even briefly, even if later removed) is compromised. Deleting it from the latest commit is not enough; it remains in history.
  • Move the value to an environment variable or a secrets manager and reference it instead of inlining.
  • Add the offending file pattern to .gitignore; consider a pre-commit hook or scanner to prevent recurrence.

This is a defensive check. Report findings so the owner can secure their own project; do not exfiltrate, store, or transmit any secret you find.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.