Main Site ↗

secrets-scanner

by benchflow-ai890173GitHub

Detects leaked API keys, tokens, passwords, and credentials in code with pre-commit hooks, CI checks, scanning rules, and remediation procedures. Use for "secret scanning", "credential detection", "API key leaks", or "secret management".

Unlock Deep Analysis

Use AI to visualize the workflow and generate a realistic output preview for this skill.

Powered by Fastest LLM

Development
Compatible Agents
Claude Code
Claude Code
~/.claude/skills/
Codex CLI
Codex CLI
~/.codex/skills/
Gemini CLI
Gemini CLI
~/.gemini/skills/
O
OpenCode
~/.opencode/skills/
O
OpenClaw
~/.openclaw/skills/
GitHub Copilot
GitHub Copilot
~/.copilot/skills/
Cursor
Cursor
~/.cursor/skills/
W
Windsurf
~/.codeium/windsurf/skills/
C
Cline
~/.cline/skills/
R
Roo Code
~/.roo/skills/
K
Kiro
~/.kiro/skills/
J
Junie
~/.junie/skills/
A
Augment Code
~/.augment/skills/
W
Warp
~/.warp/skills/
G
Goose
~/.config/goose/skills/
SKILL.md

AWS Secrets & Credential Exposure Scanner

You are an AWS secrets security expert. Hardcoded credentials are a critical breach risk — find them before attackers do.

This skill is instruction-only. It does not execute any AWS CLI commands or access your AWS account directly. You provide the data; Claude analyzes it.

Required Inputs

Ask the user to provide one or more of the following (the more provided, the better the analysis):

  1. IaC files to scan — Terraform HCL, CloudFormation YAML, CDK code, or config files
    How to provide: paste the file contents directly (remove any actual secret values first)
    
  2. Lambda function environment variable names — keys only, not values
    aws lambda get-function-configuration \
      --function-name my-function \
      --query 'Environment.Variables' \
      --output json
    
  3. ECS task definition environment variable keys — to identify where secrets are stored
    aws ecs describe-task-definition \
      --task-definition my-task \
      --query 'taskDefinition.containerDefinitions[].{Name:name,Env:environment[].name}' \
      --output json
    

Minimum required IAM permissions to run the CLI commands above (read-only):

{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": ["lambda:GetFunctionConfiguration", "ecs:DescribeTaskDefinition", "ssm:DescribeParameters"],
    "Resource": "*"
  }]
}

If the user cannot provide any data, ask them to describe: the type of files in your codebase (languages, IaC tools used) and Claude will provide a scanning checklist and patterns to search for.

Secret Types to Detect

  • AWS Access Key IDs (pattern: AKIA[0-9A-Z]{16})
  • AWS Secret Access Keys (40-char alphanumeric)
  • Database connection strings with embedded passwords
  • API keys: Stripe (sk_live_), Twilio (SK), SendGrid, Slack webhooks
  • Private SSH keys (-----BEGIN RSA PRIVATE KEY-----)
  • JWT secrets and signing keys
  • Hardcoded passwords in environment variable declarations

Steps

  1. Scan provided files for secret patterns and high-entropy strings
  2. Classify each finding by secret type and severity
  3. Estimate blast radius per exposed credential
  4. Generate migration plan to AWS Secrets Manager / Parameter Store
  5. Recommend git history remediation if secrets are in committed files

Output Format

  • Critical Findings: secrets with active credential risk
  • Findings Table: file, line, secret type, severity, blast radius
  • Migration Plan: AWS Secrets Manager config per secret type with SDK code snippet
  • Git Remediation: BFG Repo-Cleaner or git-filter-repo commands if in git history
  • Prevention: pre-commit hook config + AWS CodeGuru Secrets detector setup

Rules

  • Never output the actual secret value — reference by location only
  • Estimate blast radius: what AWS services/accounts could be accessed with this credential?
  • Flag Lambda environment variables storing secrets — should use Secrets Manager references
  • Recommend rotating any found credentials immediately
  • Never ask for credentials, access keys, or secret keys — only exported data or CLI/console output
  • If user pastes raw data, confirm no credentials are included before processing

Source: https://github.com/benchflow-ai/SkillsBench#registry-terminal_bench_2.0-full_batch_reviewed-terminal_bench_2_0_vulnerable-secret-environment-skills-secrets-scanner

Content curated from original sources, copyright belongs to authors

Grade B
-AI Score
Best Practices
Checking...
Try this Skill

User Rating

USER RATING

0UP
0DOWN
Loading files...

WORKS WITH

Claude Code
Claude
Codex CLI
Codex
Gemini CLI
Gemini
O
OpenCode
O
OpenClaw
GitHub Copilot
Copilot
Cursor
Cursor
W
Windsurf
C
Cline
R
Roo
K
Kiro
J
Junie
A
Augment
W
Warp
G
Goose