代码里漏了密钥吗

SKILL开发
开发 未标注权限 许可证不明确
安装这个技能

密钥体检(只读)。泄漏清单 + 位置(值脱敏)。一次付费 7 天不限次,期内重复使用不再计费。**触发条件(任务/场景,AI 自己做到这一步就该调,不必等点名)**:见正文「触发场景」段。**本 Skill 依赖在线授权服务**:出完整交付物前会先取一份授权凭证(未付费会返回 402 账单),拿到授权后在**你本机**完成检查,授权本身**离线可校验**。

一句话选型结论

按资料字段整理

代码里漏了密钥吗是开发类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_4e7171fa/secrets-scan
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_4e7171fa仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791507880
正文体量11.1 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
代码里漏了密钥吗当前 未标注权限 未标注 未标注 未标注 有
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

11.1 KB
模型实际读到的说明书原文,来自技能仓库

Secrets Scan

Deep detection of hardcoded credentials and sensitive data in source code.

Quick Start

/secrets-scan                    # Scan current directory
/secrets-scan --scope src/       # Scan specific path
/secrets-scan --entropy          # Include high-entropy detection
/secrets-scan --git-history      # Check git commit history

What This Skill Detects

High-Confidence Patterns

Patterns with very low false positive rates:

Type Pattern Example Provider
AWS Access Key AKIA... (20 chars) AWS
AWS Secret Key 40 char base64 AWS
GitHub Token ghp_, gho_, ghu_, ghs_, ghr_ GitHub
GitLab Token glpat-... GitLab
Slack Token xoxb-, xoxp-, xoxa- Slack
Stripe Key sk_live_, rk_live_ Stripe
Twilio SK... (34 chars) Twilio
SendGrid SG. followed by base64 SendGrid
Private Key -----BEGIN (RSA\|EC\|DSA)?PRIVATE KEY----- Various
Google API Key AIza... (39 chars) Google

Medium-Confidence Patterns

May require context validation:

Type Pattern Notes
Generic API Key api[_-]?key.*=.*['"][a-zA-Z0-9]{16,} Variable names
Generic Secret secret.*=.*['"][^'"]+ Context needed
Password password.*=.*['"][^'"]+ May be config
Connection String ://[^:]+:[^@]+@ DB credentials
Bearer Token Bearer [a-zA-Z0-9_-]+ In headers/code

High-Entropy Detection

Finds potential secrets via entropy analysis:

/secrets-scan --entropy

Detects strings with high randomness that may be:
- Base64-encoded secrets
- Hex-encoded tokens
- Custom API key formats

Detection Patterns

Full verbatim pattern tables for generic provider families — cloud provider keys (AWS/Azure/GCP), version control tokens (GitHub/GitLab/Bitbucket), payment & finance (Stripe/Square/PayPal), communication services (Slack/Twilio/SendGrid), database connection strings, private keys, and JWT — live in references/secret-patterns-extra.md. The domestic provider table (Aliyun/Tencent/DingTalk/WeChat) stays below.

Scan Options

Basic Scan

/secrets-scan

Scans for high-confidence patterns only.

With Entropy Analysis

/secrets-scan --entropy

Adds high-entropy string detection (more findings, some false positives).

Specific Scope

/secrets-scan --scope src/api/
/secrets-scan --scope "*.ts"

Git History Scan

/secrets-scan --git-history
/secrets-scan --git-history --since "2024-01-01"

Scans commit history for secrets that were committed and later removed.

Exclude Patterns

/secrets-scan --exclude "*.test.ts" --exclude "fixtures/"

Output Format

Redaction Rule (MANDATORY)

Raw matched credential values must NEVER appear in scan output, terminal logs,
saved report files, or chat/issue summaries — leaked credentials are irreversible.
Every finding MUST be reported in this exact shape:

  • Type + file:line + masked value — identifying where the finding is, never what it is verbatim.
  • Masked value form: first 4 characters + **** + last 4 characters (e.g. AKIA****MPLE).
  • (redacted) instead of 4+4 whenever the value is a password, passphrase, short token,
    or any value where 4+4 characters carry a meaningful share of its entropy.
  • Connection strings: mask the password segment entirely (postgres://user:****@host/db);
    never reveal user plus password together unmasked.

This rule admits no convenience exception: reports pasted into issues, chat, or CI logs stay redacted.
The only permitted verbatim credential-shaped text is a documented public example value
(e.g. the AWS example key) inside the false-positive/ignore reference lists below — never in scan results.

Finding Report

SECRETS SCAN RESULTS
====================

High-Confidence Findings: 2
Medium-Confidence Findings: 5
Entropy Findings: 3

[!] CRITICAL: AWS Access Key
    File: src/config/aws.ts:15
    Pattern: AKIA****MPLE
    Action: Rotate immediately, check CloudTrail

[!] CRITICAL: GitHub Token
    File: .env.example:8
    Pattern: ghp_****f42k
    Action: Revoke token, remove from history

[H] HIGH: Database Password
    File: docker-compose.yml:23
    Pattern: password: (redacted)
    Action: Use environment variable

[M] MEDIUM: Possible API Key
    File: src/services/api.ts:44
    Pattern: apiKey = "a1b2****x7Yz"
    Context: May be test value

Summary Statistics

Files scanned: 342
Patterns checked: 127
Time elapsed: 2.3s

By Severity:
  Critical: 2
  High: 5
  Medium: 8

By Type:
  Cloud credentials: 2
  API keys: 4
  Passwords: 3
  Private keys: 1
  Other: 5

False Positive Handling

Common False Positives

  1. Example/placeholder values
    - AKIAIOSFODNN7EXAMPLE (AWS example)
    - sk_test_... (Stripe test key)
    - your-api-key-here

  2. Test fixtures
    - Mock credentials in test files
    - Fixture data

  3. Documentation
    - README examples
    - API documentation

Ignore File

Create .secrets-scan-ignore:

# Ignore test fixtures
**/fixtures/**
**/__mocks__/**
*.test.ts
*.spec.js

# Ignore documentation
docs/**
*.md

# Ignore specific false positives
src/constants.ts:EXAMPLE_KEY

# Inline ignore comment
# secrets-scan-ignore: test fixture

Inline Ignore

// secrets-scan-ignore: example value
const EXAMPLE_KEY = "AKIAIOSFODNN7EXAMPLE";

Remediation Steps

Approval gate (MANDATORY): this skill is user-invoked only. Scanning and
redacted reporting need no approval, but NO remediation action below may be
executed without the user's explicit approval for that specific action —
in particular credential rotation, git history rewriting (git filter-branch,
BFG), and hook/CI installation. Propose the action, state its blast radius, wait
for approval.

When Secrets Are Found

  1. Immediate Actions
    - Rotate the credential immediately
    - Check access logs for unauthorized use
    - Remove from code/config

  2. Clean Git History
    ```bash
    # Remove secret from history
    git filter-branch --force --index-filter \
    'git rm --cached --ignore-unmatch path/to/file' \
    --prune-empty --tag-name-filter cat -- --all

# Or use BFG Repo Cleaner
bfg --replace-text secrets.txt repo.git
```

  1. Prevent Future Commits
    - Add pre-commit hooks
    - Configure secret scanning in CI

Prevention

# Install pre-commit hook
npx husky add .husky/pre-commit "npx secrets-scan --staged"

Integration

CI/CD Pipeline

# GitHub Actions
- name: Secrets Scan
  run: |
    /secrets-scan --fail-on-findings
    exit $?

# Exit codes:
# 0 = No findings
# 1 = Findings detected
# 2 = Error during scan

Pre-Commit Hook

#!/bin/sh
# .husky/pre-commit
files=$(git diff --cached --name-only)
/secrets-scan --files "$files"

Domestic & Additional Providers

Extend coverage to platforms common in China-market codebases (same confidence rules as above):

# Alibaba Cloud (Aliyun)
LTAI[a-zA-Z0-9]{12,30}                     # AccessKey ID

# Tencent Cloud
AKID[a-zA-Z0-9]{30,50}                     # SecretId (pair with SecretKey)

# DingTalk
ding[a-z0-9]{8,40}                         # AppKey/robot token (context needed)

# WeChat / WeCom (context needed — check assignment shape)
(corpid|corpsecret)\s*[:=]\s*['"][A-Za-z0-9_-]{10,}['"]

Minimal Worked Example

Invocation:

/secrets-scan --scope src/ --entropy

Output excerpt (note the mandatory redaction — masked values only):

SECRETS SCAN RESULTS
====================

High-Confidence Findings: 1

[!] CRITICAL: AWS Access Key
    File: src/config/aws.ts:15
    Pattern: AKIA****MPLE
    Action: Rotate immediately, check CloudTrail

Files scanned: 87

Exit codes (CI/hook wiring): 0 = no findings; 1 = findings detected (gate fails — that is the report, not a crash); 2 = error during scan (fix the environment, then re-run).

Failure Exits

No standalone binary ships with this skill — the scan is executed by the agent per this document, so each failure has a visible outcome in the report, never a silent pass:

  • Scope path does not exist / not a repo: report Files scanned: 0 with the reason line scope not found: <path> and stop — do not report "no findings", which reads as a clean scan. Ask the user for the correct path.
  • --git-history outside a git repository: report git history scan skipped: not a git repository and continue with the working-tree scan; the summary notes history was not covered.
  • Binary or unreadable files: counted in the summary as skipped files; never decode-and-report their contents.
  • Scan interrupted (timeout, user abort): mark the report PARTIAL — scan interrupted at <path>; do not emit a summary that implies full coverage. Re-running the same command is safe (read-only).
  • Exit 2 in a CI/hook run: environment error (e.g. git missing). Fix the environment; a non-zero from findings (1) is the gate working as intended.

Wrong Way → Fix (FAQ)

Wrong way Observable symptom Fix
Pasting a full credential into a report, issue, or chat Verbatim secret visible in output Violates the Redaction Rule — report type + file:line + masked value only. If already exposed, rotate first, then clean the transcript.
Rotating or rewriting git history without asking Remediation executed unprompted Approval gate: propose the action, state blast radius, wait for explicit user approval.
Scanning dependency CVEs or IaC misconfigurations with this skill Findings categories outside credentials Out of scope — route to /dependency-scan or /config-scan.
Trusting .secrets-scan-ignore to hide a real leak Ignored finding never appears in reports Ignore lists are for known false positives (fixtures, docs). If a real credential sits in an ignored path, the scan cannot see it — audit the ignore file when a leak is suspected.
Treating sk_test_ / example keys as leaks CRITICAL finding on AKIAIOSFODNN7EXAMPLE Apply the documented false-positive list before escalating; document new false positives in .secrets-scan-ignore with a reason comment.

Related Skills

  • /security-scan - Full security analysis
  • /config-scan - Configuration security
  • /dependency-scan - Package vulnerabilities

常见问题

5 问
答案由本站依据条目字段整理
代码里漏了密钥吗怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_4e7171fa/secrets-scan。安装方式为未标注。装完刷新技能列表或重开客户端。

代码里漏了密钥吗支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

代码里漏了密钥吗权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

代码里漏了密钥吗收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

代码里漏了密钥吗用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。