Agent Skillsinstructa/agent-skills › secleak-check

secleak-check

GitHub

用于扫描代码仓库中的密钥泄露、依赖漏洞及配置错误。支持使用 BetterLeaks 和 Trivy 工具进行安全检测,并提供添加秘密泄露防护护栏、CI 集成及 Git 钩子的设置指南。

skills/security/secleak-check/SKILL.md instructa/agent-skills

触发场景

扫描泄露的密钥 检查依赖漏洞 检测配置错误 添加秘密泄露防护护栏 发布前运行安全检查

安装

npx skills add instructa/agent-skills --skill secleak-check -g -y
更多选项

非标准路径

npx skills add https://github.com/instructa/agent-skills/tree/main/skills/security/secleak-check -g -y

不安装直接使用

npx skills use instructa/agent-skills@secleak-check

指定 Agent (Claude Code)

npx skills add instructa/agent-skills --skill secleak-check -a claude-code -g -y

安装 repo 全部 skill

npx skills add instructa/agent-skills --all -g -y

预览 repo 内 skill

npx skills add instructa/agent-skills --list

SKILL.md

Frontmatter
{
    "name": "secleak-check",
    "description": "Run or install repo security leak checks with BetterLeaks and Trivy. Use when asked to scan for leaked secrets, vulnerable dependencies, misconfigurations, add secret-leak guardrails, add BetterLeaks, add forbidden-path hooks, or run secleak-check before release."
}

Secleak Check

Workflow

  1. Confirm cwd and repo root.
  2. For a scan request, run the bundled script from this skill, not a target-repo script.
  3. For a setup request, add repo-local guardrails from references/guardrails.md.
  4. Quote exact failing tool output, but never print raw secret values.
  5. If the bundled script is unavailable, use the manual fallback commands below.

Bundled command

Resolve scripts/secleak-check.sh relative to this SKILL.md.

Common installed path:

/Users/kregenrek/.agents/skills/secleak-check/scripts/secleak-check.sh

Manual fallback

betterleaks git --no-banner --redact=100 .
trivy fs --scanners vuln,secret,misconfig --exit-code 1 .

Prefer .betterleaks.toml when present. If only .gitleaks.toml exists, pass --config .gitleaks.toml; BetterLeaks supports it for compatibility.

Reporting

  • betterleaks findings are blockers until verified false-positive or remediated.
  • For historical leaks, report file, line, commit, rule, and fingerprint only.
  • trivy dependency vulnerabilities should be summarized by severity and top fixed versions.
  • Misconfig findings inside node_modules are dependency artifact noise unless that file is built or shipped by the repo.

Guardrail setup

When asked to harden a repo against secret leaks:

  1. Inventory existing .betterleaks.toml, .gitleaks.toml, secret-scan workflows, Dependabot, and hook tooling.
  2. Add .forbidden-paths.regex and a staged-file hook.
  3. Add .betterleaks.toml with path-based filters only for fixtures.
  4. Add repo-local scripts/secleak-check.sh only when the repo wants a first-class local script.
  5. Add CI secret scanning and Dependabot when GitHub Actions are in scope.
  6. Update .gitignore for runtime dirs, env files, credentials, keys, and infra state.

Templates live in references/guardrails.md; small examples live in references/examples.md.

版本历史

  • 11dfe69 当前 2026-08-20 11:31

同 Skill 集合

skills/delegation/delegate-fable/SKILL.md
skills/delegation/delegate-grok/SKILL.md
skills/delegation/delegate-sol/SKILL.md
skills/design/redesign-my-landingpage/SKILL.md
skills/electron/electron-live-test/SKILL.md
skills/engineering/architecture-ownership/SKILL.md
skills/engineering/clarify/SKILL.md
skills/engineering/consolidate-test-suites/SKILL.md
skills/engineering/find-duplicate-ownership/SKILL.md
skills/engineering/hard-cut/SKILL.md
skills/engineering/root-cause-finder/SKILL.md
skills/engineering/search-context/SKILL.md
skills/git/gitwhat/SKILL.md
skills/go/go-local-health/SKILL.md
skills/release/homebrew-publish/SKILL.md
skills/security/package-security-check/SKILL.md
skills/shell/shellck/SKILL.md
skills/specs/app-spec-packager/SKILL.md

元信息

文件数
0
版本
7e90526
Hash
d68e95c3
收录时间
2026-08-20 11:31

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-09 15:34
浙ICP备14020137号-1 $访客地图$