← 返回
开发者工具 中文

Secrets Scanner

Detect hardcoded secrets, exposed API keys, and credential misconfigurations in IaC and config files
检测IaC和配置文件中的硬编码机密、暴露的API密钥及凭证配置错误。
anmolnagpal
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 842
下载
💾 6
安装
1
版本
#latest

概述

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)

```

  1. Lambda function environment variable names — keys only, not values

```bash

aws lambda get-function-configuration \

--function-name my-function \

--query 'Environment.Variables' \

--output json

```

  1. ECS task definition environment variable keys — to identify where secrets are stored

```bash

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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 05:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 666 📥 323,714
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 65 📥 179,753
ai-intelligence

Anomaly Explainer

anmolnagpal
诊断AWS成本异常,并在支出意外激增时用通俗易懂的语言解释根本原因。
★ 0 📥 844