Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

secretssecrets 开发

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

220

周安装

9

GitHub Stars

9

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:secrets(secrets 开发)
来源仓库:https://github.com/florianbuetow/claude-code
仓库路径:skills/secrets
安装命令:
npx skills add https://github.com/florianbuetow/claude-code --skill secrets
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/florianbuetow/claude-code --skill secrets

简介

用于辅助安全审计和凭据风险排查。secrets 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合梳理敏感配置和检查依赖风险。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 不能将工具输出直接作为最终结论。
  • 涉及密钥或生产系统时需确认最小权限。
  • 安装前应核实操作边界和脱敏方式。

SKILL.md

Secrets Detection (SEC)

Analyze source code, configuration files, and git history for hardcoded credentials, API keys, tokens, private keys, and other sensitive material that should never appear in version control. Secrets in code are among the most immediately exploitable vulnerabilities -- a single leaked API key can lead to full account compromise within minutes.

Supported Flags

Read ../../shared/schemas/flags.md for the full flag specification. This skill supports all cross-cutting flags. Key behaviors:

FlagSecrets-Specific Behavior
--scopeDefault changed. Secrets analysis scans all file types including config, YAML, JSON,.env, scripts, and source code.
--depth quickScanners only (gitleaks/trufflehog), no manual pattern analysis.
--depth standardFull file read of scoped files + Grep heuristics for patterns scanners miss.
--depth deepStandard + scan git history for previously committed and removed secrets.
--depth expertDeep + verify whether detected secrets are still active/valid, DREAD scoring.
--severityFilter output. Most secrets findings are critical or high.
--fixGenerate remediation: remove secret, add to.gitignore, rotate credential.

Detection Patterns

Read references/detection-patterns.md for the full pattern catalog with language-specific examples, regex heuristics, and false positive guidance.

Pattern Summary:

  1. API keys and tokens hardcoded in source code
  2. Passwords and credentials in configuration files
  3. .env files committed to version control
  4. Private keys (RSA, EC, PGP) in repository
  5. Database connection strings with embedded credentials
  6. High-entropy strings matching secret patterns

Workflow

Step 1: Determine Scope

  1. Parse --scope flag (default: changed).
  2. Resolve to a concrete file list.
  3. Include ALL file types -- secrets can appear anywhere: .py, .js, .ts, .java, .go, .env, .yml, .yaml, .json, .xml, .toml, .ini, .cfg, .conf, .properties, .tf, .tfvars, .sh, .bash, .zsh, .dockerfile, docker-compose.*, *.pem, *.key.
  4. Check for .gitignore coverage of sensitive file patterns.

Step 2: Check for Scanners

Detect available scanners in priority order:

ScannerDetectSecrets Coverage
gitleakswhich gitleaks150+ secret patterns, git history scanning, custom rules
trufflehogwhich trufflehog700+ credential detectors, live verification of found secrets
trivywhich trivySecrets detection as part of broader filesystem scan

Record which scanners are available and which are missing. If none are available, note: "No scanner available -- findings based on code pattern analysis only."

Step 3: Run Scanners

For each available scanner, run against the scoped files:

gitleaks detect --source <target> --report-format json --report-path /dev/stdout --no-banner
trufflehog filesystem --json <target>

At --depth deep, also scan git history:

gitleaks detect --source <target> --report-format json --report-path /dev/stdout --no-banner --log-opts="--all"
trufflehog git --json file://<target>

Normalize scanner output to the findings schema (see ../../shared/schemas/findings.md). Use the severity mapping from ../../shared/schemas/scanners.md.

Step 4: Claude Analysis

Read each scoped file and analyze for secret patterns not caught by scanners:

  1. Identify secret-like values: Look for strings matching API key formats, base64-encoded credentials, high-entropy strings in assignment contexts.
  2. Check context: Is the value in a variable named key, secret, token, password, credential, api_key, or similar?
  3. Verify not placeholder: Exclude values like YOUR_API_KEY_HERE, changeme, xxx, dummy, test, example, placeholder.
  4. Check.gitignore: Are .env, *.pem, *.key, credentials.json patterns in .gitignore? Flag missing patterns.
  5. Deduplicate: Merge Claude findings with scanner findings.

At --depth deep or --depth expert:

  • Trace secret usage across files to map exposure surface.
  • Check if secrets are loaded from environment variables (good) vs hardcoded (bad).
  • Verify secret rotation practices (key age, rotation infrastructure).

Step 5: Report

Output findings using the format from ../../shared/schemas/findings.md.

Each finding must include:

  • id: SEC-001, SEC-002, etc.
  • title: Secret type and location (e.g., "AWS access key in config.py").
  • severity: Based on secret type, exposure scope, and verification status.
  • location: File, line, and masked snippet (NEVER include the full secret).
  • description: What type of secret was found and how it is exposed.
  • impact: What an attacker can access with this secret.
  • fix: Remove from code, add to.gitignore, rotate credential, use env vars.
  • references: CWE-798, CWE-321, CWE-312.

CRITICAL: Never output the actual secret value in findings. Always mask the middle portion: AKIA****XMPL.

What to Look For

These are the primary secret patterns to detect. Each has detailed examples and regex heuristics in references/detection-patterns.md.

  1. AWS access keys: AKIA[0-9A-Z]{16} patterns in source code
  2. Generic API keys: Long alphanumeric strings assigned to key/token variables
  3. Passwords in config: password = "...", DB_PASSWORD, connection strings
  4. Private keys: -----BEGIN RSA PRIVATE KEY----- and similar PEM headers
  5. OAuth/JWT secrets: Client secrets, signing keys, bearer tokens
  6. Cloud provider tokens: GCP service account keys, Azure connection strings
  7. .env files committed: Entire environment files with production secrets
  8. Git history secrets: Secrets that were committed then "removed" but remain in history
  9. High-entropy strings: Base64 or hex strings in suspicious contexts
  10. Connection strings: Database URIs with embedded username:password

Scanner Integration

Primary: gitleaks (fast, comprehensive pattern matching), trufflehog (live verification) Secondary: trivy (secrets as part of broader scanning) Fallback: Grep regex patterns from references/detection-patterns.md

When scanners are available, run them first and use Claude analysis to:

  • Validate scanner findings (filter false positives like example values).
  • Find secret patterns scanners miss (custom key formats, obfuscated secrets).
  • Assess impact based on secret type and code context.

When no scanners are available, Claude performs full pattern-based analysis using the Grep heuristics from references/detection-patterns.md and contextual code reading. Report these findings with confidence: medium.

Output Format

Use finding ID prefix SEC (e.g., SEC-001, SEC-002).

All findings follow the schema in ../../shared/schemas/findings.md with:

  • references.cwe: "CWE-798" (hardcoded credentials) or "CWE-312" (cleartext storage)
  • references.owasp: "A07:2021" (Identification and Authentication Failures)
  • metadata.tool: "secrets"
  • metadata.framework: "specialized"
  • metadata.category: "SEC"

CWE Mapping by Secret Type:

Secret TypeCWETypical Severity
Hardcoded passwordCWE-798critical
API key in sourceCWE-798critical
Private key committedCWE-321critical
.env file committedCWE-312high
Connection string with credentialsCWE-798critical
High-entropy string (unverified)CWE-798medium
Missing.gitignore for secret filesCWE-312medium

Summary Table

After all findings, output a summary:

| Secret Type        | Critical | High | Medium | Low |
|--------------------|----------|------|--------|-----|
| API Keys/Tokens    |          |      |        |     |
| Passwords          |          |      |        |     |
| Private Keys       |          |      |        |     |
| Connection Strings |          |      |        |     |
| .env / Config      |          |      |        |     |
| Git History        |          |      |        |     |

Followed by: top 3 priorities, scanner coverage notes, rotation recommendations, and overall assessment.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.98%
按下载量换算26

Claude

29.43%
按下载量换算21

Cursor

22.05%
按下载量换算16

Gemini CLI

9.45%
按下载量换算7

安全审计

Gen Agent Trust Hub

可疑

Socket

可疑

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills