secret-scanner

secret-scanner is a skill for Claude Code, Codex from tahirraufkeeyu/software-development-agent-stack--sdas. It costs 75 tokens per session (1,677 once invoked), scanned A, original, MIT.

A secret-detection tool that searches a repository and its Git history for exposed credentials such as API keys and tokens. It filters known false positives and redacts matched values in reports.

In plain words
What is it for?
Use it to scan a repository, investigate a suspected leaked credential, or block new secrets before commits are merged.
Why use it?
It helps find credentials that may remain hidden in old commits, reflogs, or stashes, including before a repository is made public.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is echo "Secrets detected — see ./out/secrets-report.md".

Good fit Use it to scan a repository, investigate a suspected leaked credential, or block new secrets before commits are merged.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/tahirraufkeeyu/software-development-agent-stack--sdas
agentmods
npx agentmods add skills/tahirraufkeeyu/software-development-agent-stack--sdas/secret-scanner

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for secret-scanner

README.md
[![agentmods](https://agentmods.dev/badge/skills/tahirraufkeeyu/software-development-agent-stack--sdas/secret-scanner/github.svg)](https://agentmods.dev/skills/tahirraufkeeyu/software-development-agent-stack--sdas/secret-scanner)
Your own site
<a href="https://agentmods.dev/skills/tahirraufkeeyu/software-development-agent-stack--sdas/secret-scanner"><img src="https://agentmods.dev/badge/skills/tahirraufkeeyu/software-development-agent-stack--sdas/secret-scanner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for secret-scanner

Your own site · 80×15
<a href="https://agentmods.dev/skills/tahirraufkeeyu/software-development-agent-stack--sdas/secret-scanner"><img src="https://agentmods.dev/badge/skills/tahirraufkeeyu/software-development-agent-stack--sdas/secret-scanner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,677 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.01677
Opus 5 $0.00037 $0.00839
Sonnet 5 $0.00015 $0.00335
Haiku 4.5 $0.00007 $0.00168

Measured 7d ago against content hash 8779d8ccf0c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

secret-scanner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/nuclear-scan.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

departments/security/skills/secret-scanner/SKILL.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

When to use

Trigger this skill on any of:

  • "Scan this repo for secrets / leaked keys / API tokens."
  • "We think a credential was committed — help us remediate."
  • "Repo is going public next week."
  • Pre-merge hook that needs to refuse commits with new secrets.

Do not use this skill for live runtime secret detection (key rotation monitoring, cloud config scanning). Use it for code-at-rest and git history only.

Inputs

  • REPO_PATH (default: .) — path to the git repo.
  • ALLOWLIST (default: .gitleaks.toml or .secret-scanner-allowlist.yaml at repo root) — known false positives.
  • OUT_DIR (default: ./secret-scan-out).
  • SCAN_REFLOG (default: 1) — also scan reflog + stash refs.
  • Optional env:
    • TRUFFLEHOG_CONFIG — path to a custom trufflehog config.
    • REDACT (default: 1) — redact matched values in reports.

Outputs

  • gitleaks-report.json — raw Gitleaks findings.
  • trufflehog-report.json — raw TruffleHog findings.
  • secrets.deduped.json — unified, allowlist-filtered, deduplicated result.
  • secrets-report.md — human report with per-finding remediation steps.

Each unified record:

{
  "id": "sha256(commit|file|rule|match)[0:12]",
  "rule": "aws-access-key",
  "file": "src/infra/deploy.sh",
  "commit": "a1b2c3d",
  "author": "[email protected]",
  "date": "2024-06-12T09:14:22Z",
  "line": 42,
  "redacted_match": "AKIA****************",
  "verified": true,
  "severity": "critical",
  "allowlisted": false
}

Tool dependencies

Procedure

  1. Confirm $REPO_PATH is a git repo (git rev-parse --is-inside-work-tree).
  2. Fetch all refs first: git fetch --all --tags --prune.
  3. Run scripts/nuclear-scan.sh "$REPO_PATH" "$OUT_DIR" which executes Gitleaks (detect + protect), TruffleHog over the git file URI, and iterates branches, tags, reflog, and stash refs.
  4. Merge the two JSON outputs. Key by (commit_sha, file_path, rule_id, match_sha256) and dedupe.
  5. Apply allowlist: drop records whose (file_path, rule_id) pair matches a regex in the allowlist. Every drop keeps a skipped_by_allowlist counter that is logged.
  6. Triage: for every remaining record,
    • Verify with TruffleHog's --only-verified style detector when possible (sets verified: true|false).
    • Classify severity: verified live credential -> Critical; historical credential known rotated -> High; placeholder or test -> Low.
  7. Emit secrets-report.md containing:
    • Top-line counts by severity.
    • A "Remediation sequence" section (always this order):
      1. Rotate the credential at the issuer (AWS, GitHub, Stripe, ...). Never do history rewrite first — a rewritten commit doesn't revoke a live key.
      2. Invalidate any cached credential (CI secret store, deploy platform env vars, developer laptops).
      3. Rewrite history with git filter-repo (preferred) or BFG.
      4. Force-push (coordinate with team). Every collaborator re-clones.
      5. Update the allowlist with a post-rotation hash so the dead secret doesn't re-trigger alerts.
  8. Provide exact commands tailored to each finding:
    • git filter-repo --invert-paths --path <file> when the file should go.
    • git filter-repo --replace-text replacements.txt when only the secret should be scrubbed, preserving surrounding content.
  9. Return non-zero if any verified Critical remains.

Read the full file on GitHub · 160 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 160 lines · 75 tokens per session scan A 8779d8ccf0c0

Subscribe to this mod's changes

secret-scanner is a skill published in the GitHub repository tahirraufkeeyu/software-development-agent-stack--sdas (18 stars, last pushed 4mo ago), licensed MIT. It adds 75 tokens to every session and 1,677 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.