check-secrets

check-secrets is a command for coding agents from harish-garg/security-scanner-plugin. It costs 6 tokens per session (704 once invoked), scanned A, original, MIT.

A scan for exposed secrets such as access tokens, API keys, and other credentials in a GitHub repository. It reports where active findings were detected without showing the secret values.

In plain words
What is it for?
Use it to review open secret alerts, their types, and their file or commit locations.
Why use it?
It helps find credentials that may have been committed to source code and need to be revoked or replaced.

Command

Part of the github-security-scanner plugin — 4 commands, 1 agent shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/harish-garg/security-scanner-plugin/check-secrets
Clone the repo
git clone --depth 1 https://github.com/harish-garg/security-scanner-plugin

Or install github-security-scanner, the plugin that ships this one along with the rest of its 4 commands, 1 agent.

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 check-secrets

README.md
[![agentmods](https://agentmods.dev/badge/commands/harish-garg/security-scanner-plugin/check-secrets.svg)](https://agentmods.dev/commands/harish-garg/security-scanner-plugin/check-secrets)
Your own site
<a href="https://agentmods.dev/commands/harish-garg/security-scanner-plugin/check-secrets"><img src="https://agentmods.dev/badge/commands/harish-garg/security-scanner-plugin/check-secrets.svg" alt="Measured on agentmods" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 704 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00006 $0.00704
Opus 5 $0.00003 $0.00352
Sonnet 5 $0.00001 $0.00141
Haiku 4.5 $0.00001 $0.00070

Measured 4d ago against content hash 2a511849269c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

check-secrets 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 4d ago.

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.

commands/check-secrets.md · 85 lines

How it starts

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

Check Secrets

Scan the repository for exposed secrets, tokens, and credentials.

What to do:

  1. Identify repository: Determine the current repository (owner/repo) from Git configuration

    • Use git remote -v or check .git/config to find the repository
    • Parse owner and repo name from GitHub URL
  2. Scan for secrets: Use GitHub MCP's list_secret_scanning_alerts tool with parameters:

    • owner: repository owner
    • repo: repository name
    • state: "open" (to show only active/unresolved secrets)
  3. Analyze findings:

    • Count total exposed secrets
    • Group by secret type
    • Check state (open vs resolved)
    • Note locations (file paths, commit SHAs)
  4. Present security-conscious summary:

    Secret Scanning Results for owner/repo
    
    🔒 Security Status: [X exposed secrets found / All clear]
    
    Total alerts: X
    - Active (Open): X
    - Resolved: X
    
    Types of secrets detected:
    - GitHub Personal Access Token: X
    - AWS Access Key: X
    - API Keys: X
    - Other credentials: X
    
    🚨 Active Secrets (Open):
    1. [Secret Type] detected
       Location: path/to/file.js (commit abc123)
       Detected: [Date]
       ⚠️ Action required: Revoke and rotate this credential immediately
    
    2. [Secret Type] detected
       Location: path/to/config.yml
       ⚠️ Action required: Remove from history and rotate
    
    [List all active secrets - this is critical]
    
    🛡️ Remediation Steps:
    1. **Immediate**: Revoke exposed credentials at their source
       - GitHub tokens: https://github.com/settings/tokens
       - AWS keys: AWS IAM Console
       - API keys: Provider's dashboard
    
    2. **Remove from history**: Secrets in Git history remain accessible
       - Use git filter-repo or BFG Repo-Cleaner
       - Or contact GitHub Support for repository wipe
    
    3. **Prevent future leaks**:
       - Add .env to .gitignore
       - Use environment variables for secrets
       - Enable pre-commit hooks
       - Consider using GitHub secret scanning push protection
    
    📚 Resources:
    - Removing sensitive data: https://docs.github.com/articles/removing-sensitive-data-from-a-repository
    - Secret scanning: https://github.com/owner/repo/security/secret-scanning
    

Read the full file on GitHub · 85 lines

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. 4d ago First seen · 85 lines · 6 tokens per session scan A 2a511849269c

Subscribe to this mod's changes

check-secrets is a command published in the GitHub repository harish-garg/security-scanner-plugin (9 stars, last pushed 10mo ago), licensed MIT. It adds 6 tokens to every session and 704 once invoked, about $0.0000 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-08-31.