secret-scan

secret-scan is a command for Claude Code from uttej-badwane/secure-cloud-prompt-engineering. It costs 17 tokens per session (495 once invoked), scanned A, original, MIT.

A command that searches Infrastructure as Code, configuration, and CI/CD files for exposed secrets such as passwords, private keys, access tokens, and credentials.

In plain words
What is it for?
Use it to check cloud configuration, environment files, Terraform variable files, Kubernetes resources, Ansible variables, and pipeline definitions for likely secret leaks.
Why use it?
It helps find sensitive values that may have been committed to a code repository or included in deployment settings.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the secure-cloud-prompt-engineering plugin — 1 skill, 5 commands, 3 agents, 3 hooks shipped together

Good fit Use it to check cloud configuration, environment files, Terraform variable files, Kubernetes resources, Ansible variables, and pipeline definitions for likely secret leaks.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/uttej-badwane/secure-cloud-prompt-engineering/secret-scan
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.

Clone the repo
git clone --depth 1 https://github.com/uttej-badwane/secure-cloud-prompt-engineering

Made for: Claude Code.

Or install secure-cloud-prompt-engineering, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 3 agents, 3 hooks.

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-scan

README.md
[![agentmods](https://agentmods.dev/badge/commands/uttej-badwane/secure-cloud-prompt-engineering/secret-scan/github.svg)](https://agentmods.dev/commands/uttej-badwane/secure-cloud-prompt-engineering/secret-scan)
Your own site
<a href="https://agentmods.dev/commands/uttej-badwane/secure-cloud-prompt-engineering/secret-scan"><img src="https://agentmods.dev/badge/commands/uttej-badwane/secure-cloud-prompt-engineering/secret-scan/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-scan

Your own site · 80×15
<a href="https://agentmods.dev/commands/uttej-badwane/secure-cloud-prompt-engineering/secret-scan"><img src="https://agentmods.dev/badge/commands/uttej-badwane/secure-cloud-prompt-engineering/secret-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 495 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.00017 $0.00495
Opus 5 $0.00009 $0.00247
Sonnet 5 $0.00003 $0.00099
Haiku 4.5 $0.00002 $0.00049

Measured 8d ago against content hash 73807c2cbcbb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

secret-scan 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 8d 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/secret-scan.md · 54 lines

What it actually says

Perform a targeted scan for hardcoded secrets and credential leaks across IaC files, config files, and CI/CD pipeline definitions.

What to Look For

High-Confidence Patterns (CRITICAL)

  • AWS access keys (AKIA[0-9A-Z]{16})
  • AWS secret keys (40-char alphanumeric strings near "secret")
  • Private keys (-----BEGIN RSA PRIVATE KEY-----, -----BEGIN EC PRIVATE KEY-----)
  • GitHub personal access tokens (ghp_, gho_, ghs_, ghu_)
  • Generic API keys in assignments (api_key = "...", token = "...")
  • Database connection strings with embedded passwords
  • Kubernetes Secret resources with base64 values that decode to credentials

Medium-Confidence Patterns (HIGH)

  • Passwords in ENV, ARG, or environment variable blocks
  • Secrets in .env files committed to the repository
  • Sensitive values in terraform.tfvars or *.auto.tfvars
  • Credentials in CI/CD YAML (not using ${{ secrets.* }} or $CI_*)
  • Ansible variables containing "password", "secret", "key", "token"

Common False Positives to Exclude

  • Example/placeholder values ("your-api-key-here", "REPLACE_ME", "<token>")
  • Test fixtures clearly marked as fake
  • Commented-out code

Steps

  1. Scan target files (or entire directory if no argument)
  2. For each match, report:
    • File path and line number
    • The matched pattern type
    • Severity (CRITICAL/HIGH)
    • Recommended fix (use secret manager reference instead)
  3. Never print the actual secret value — mask it as [REDACTED]
  4. After reporting, offer to replace hardcoded values with the appropriate secret reference:
    • Terraform: data.aws_secretsmanager_secret_version.*
    • Kubernetes: secretKeyRef or External Secrets Operator
    • GitHub Actions: ${{ secrets.SECRET_NAME }}
    • Ansible: "{{ vault_variable_name }}"

Usage

/secret-scan
/secret-scan terraform/
/secret-scan .github/workflows/deploy.yml
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. 8d ago First seen · 54 lines · 17 tokens per session scan A 73807c2cbcbb

Subscribe to this mod's changes

secret-scan is a command published in the GitHub repository uttej-badwane/secure-cloud-prompt-engineering (2 stars, last pushed 6mo ago), licensed MIT. It adds 17 tokens to every session and 495 once invoked, about $0.0001 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.