跳到正文
cccskills
免费在 GitHub 公开

trufflehog-scanning

Configures and runs TruffleHog v3 - secret scanner with **live verification** (validates discovered secrets against provider APIs to confirm actual exposure vs entropy false positive); supports per-source subcommands (`git`, `github`, `gitlab`, `filesystem`, `s3`, `docker`, `gcs`, `postman`); `--results=verified` filter for high-precision output; `--exclude-detectors=TYPE` for noise reduction; exits 183 on findings via `--fail`. Use when the team needs verified secret findings (low false-positive rate) or scans across cloud + repo + container surfaces.

中文简介正在准备中。当前显示原文说明。

testland/qa星标 13(GitHub 13 + cccskills 0)
集成工具GitLabAWSDocker

实测评分 未实测

查看安装方法

包含的文件(2)

  • SKILL.md8.0 KB
  • .tessl-plugin/plugin.json694 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

trufflehog-scanning

Overview

Per github.com/trufflesecurity/trufflehog:

TruffleHog v3's distinguishing feature is live verification - discovered secrets are tested against the provider API to confirm they're actual valid credentials. This dramatically reduces false-positive rate vs entropy-only scanners.

The verification works for many cloud providers, SaaS APIs, and custom-detector definitions. Filter to --results=verified to skip unverified hits in CI gating.

When to use

  • Team needs low-FP-rate secret scanning (verification > entropy alone).
  • Scanning beyond git: GitHub orgs, GitLab repos, S3 buckets, Docker images, Postman workspaces.
  • Verified-only output for CI gating (block only confirmed-real secrets; track unverified separately).
  • Layered with gitleaks-scanning for cross-tool consensus.

Step 1 - Install

Per th-gh:

# Homebrew
brew install trufflehog

# Docker
docker run --rm -it -v "$PWD:/pwd" trufflesecurity/trufflehog:latest \
  github --repo https://github.com/trufflesecurity/test_keys

# Install script (Linux/macOS)
curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh \
  | sh -s -- -b /usr/local/bin

# From source
git clone https://github.com/trufflesecurity/trufflehog.git
cd trufflehog && go install

Step 2 - Per-source subcommands

Per th-gh TruffleHog uses subcommands per data source:

SubcommandUse
gitLocal Git repositories (full history)
githubGitHub orgs / repos (live API scan)
gitlabGitLab repositories
filesystemLocal files / directories (no git)
s3AWS S3 buckets
dockerDocker images (layered)
gcsGoogle Cloud Storage
postmanPostman workspaces

Examples per th-gh:

# Scan git repository, verified only
trufflehog git https://github.com/trufflesecurity/test_keys --results=verified

# Scan GitHub organization with JSON output
trufflehog github --org=trufflesecurity --results=verified --json

# Scan local filesystem
trufflehog filesystem path/to/file1.txt path/to/dir

Step 3 - Verification: the killer feature

Per th-gh:

"--results=verified - Show only credentials confirmed valid through API testing"

The verification flow per detector:

  1. Regex match a candidate secret in source
  2. Construct a provider-specific API call (e.g., AWS GetCallerIdentity)
  3. If the call succeeds with the candidate as the credential, mark as verified
  4. Filter the output by verification status

This is the difference between "high entropy string that LOOKS like an AWS key" (probably a false positive) and "valid AWS key that will let an attacker into your account" (definitely real).

Trade-off: verification calls can be detected by the provider

  • may generate audit-log entries. For compliance-sensitive scans, disable via --no-verification.

Step 4 - Output formats

Per th-gh:

FlagUse
--jsonMachine-readable JSON output
--github-actionsGitHub Actions annotation format
(default)Human-readable text

For secrets-rotation-runner integration, use --json --results=verified:

trufflehog git . --json --results=verified > verified-secrets.json

Step 5 - False-positive triage (MANDATORY)

TruffleHog has fewer false positives than entropy-only scanners (thanks to verification), but unverified findings still need triage:

MechanismUse
--results=verified filterMost aggressive: only confirmed-real secrets in output
--exclude-detectors=TYPE,TYPE2Disable specific detectors (e.g., overly noisy ones)
--include-detectors=TYPE,TYPE2Whitelist mode: ONLY listed detectors
--no-verificationDisable API calls (use entropy + regex only - more FPs)
--exclude-paths=PATH_PATTERNSkip directories (vendor, generated code)
--config=trufflehog.yamlYAML config for advanced control

trufflehog.yaml example:

detectors:
  - name: "AWS"
    enabled: true
  - name: "PrivateKey"
    enabled: true
  - name: "GenericAPIKey"
    enabled: false   # too noisy in this codebase

verification: true
exclude_paths:
  - "tests/fixtures/**"
  - "vendor/**"

Justification template (mandatory in trufflehog.yaml comments or sibling REASONS.md):

# Reason: GenericAPIKey detector produces 50+ FPs per scan in our codebase
#         (matches our own fingerprint hashes that look like keys but aren't).
# Approved-by: alice@example.com
# Re-review-date: 2026-09-15 (re-evaluate after fingerprint format migration)
detectors:
  - name: "GenericAPIKey"
    enabled: false

Cadence: every quarter, audit trufflehog.yaml disabled detectors

  • exclude_paths; expired entries removed.

Step 6 - Failure semantics

Per th-gh:

"--fail - Exit with code 183 if secrets found"

Exit codes:

  • 0 - no secrets found
  • 183 - secrets found (with --fail)
  • (other) - runtime errors

CI usage:

trufflehog git . --results=verified --fail
# Exit 183 if verified secrets found; exit 0 otherwise
# CI workflow fails the job on non-zero exit

Step 7 - Pre-commit + CI integration

Pre-commit hook (community-supported, not first-party):

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/trufflesecurity/trufflehog
    rev: v3.81.0
    hooks:
      - id: trufflehog
        args: ['--results=verified', '--fail']

GitHub Action:

jobs:
  trufflehog:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
        with: { fetch-depth: 0 }
      - uses: trufflesecurity/trufflehog@main
        with:
          path: ./
          base: ${{ github.event.pull_request.base.sha }}
          head: HEAD
          extra_args: --results=verified --fail

base + head enable diff-only scanning on PRs (faster).

Step 8 - Cross-tool layering

Pair with gitleaks-scanning:

  • gitleaks: faster, regex-based, runs in pre-commit
  • trufflehog: slower (verification calls), high-precision, runs in CI

Run both in CI; gitleaks catches what didn't make it past pre-commit; trufflehog catches what gitleaks missed (e.g., novel formats not yet in gitleaks' rule library).

Anti-patterns

Anti-patternWhy it failsFix
--no-verification in CIFloods PR with FPsUse --results=verified (Step 3)
Skip --fail flagExit code is 0 even with secrets; CI passes wronglyAlways --fail (Step 6)
Disable detectors without REASONS docNo audit trailMandatory template (Step 5)
Verification on auth-rate-limited APIsTriggers provider rate-limit alerts--no-verification for those + accept FP risk
Skip diff-only scanning on PRsFull repo scan slow on every PRbase + head flags (Step 7)

Limitations

  • Verification API calls may trigger provider audit-log alerts (false positives in the security team's incident queue).
  • Rate-limited APIs may slow scans or fail verification on large secret pools.
  • Verification doesn't prove the secret hasn't been already rotated - a "valid" key per TruffleHog might be a recently-rotated legacy key still active for grace period.
  • TruffleHog Enterprise (paid) has more detectors + features; the OSS version covers ~200 detectors.

References

  • th-gh - repository, install, commands, exit codes
  • trufflesecurity.com - company site
  • gitleaks-scanning - sister scanner
  • secrets-rotation-runner - rotation workflow after detection

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Builds a CI gate that fails the build on **new** WCAG / a11y violations introduced by a PR while grandfathering pre-existing violations on a per-rule / per-page baseline. Aggregates verdicts from axe-core / pa11y / Lighthouse a11y / WAVE / IBM Equal Access scans. Use when a project has accumulated a11y debt and a strict "zero violations" gate would block every PR - the ratchet pattern lets the team ship while preventing regressions.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Workflow skill that builds an A/B-test validity checklist from an experiment proposal, walking the canonical design-correctness gates - pre-registered OEC/power/guardrails, randomization unit + SRM check, assignment integrity, telemetry, peeking discipline, novelty/primacy, post-experiment SRM re-check - into a per-experiment checklist + sign-off form. Use when launching, auditing, or governing an experiment. For pitfall mechanics (guardrails, peeking) see experiment-results-interpreter's references; to read an already-valid result use experiment-results-interpreter; for per-SDK harness tests use experiment-sdk-testing - this gates DESIGN, not SDK code.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

The single install-flow skill: the reference contract for the PWA install flow (installability gate fields, `beforeinstallprompt` handshake, per-platform paths - Android WebAPK / iOS Share menu / Firefox no-op - and the `display-mode` post-install signal, in references/install-flow-reference.md) plus the build-an-X workflow that emits the Add-to-Home-Screen suite. Walks the four-stage timeline, emitting one test per gate cell per [web.dev/articles/install-criteria][install-criteria], the deferred-prompt → `prompt()` → `userChoice` chain per [web.dev/articles/customize-install][customize-install], the iOS Safari manual-metadata branch (`apple-touch-icon`) per [web.dev/learn/pwa/installation][learn-pwa], and the post-install `(display-mode: standalone)` MQ assertion. Output: a Playwright spec with per-stage cells plus a coverage matrix. Use when a PWA's manifest, icons, or install handler change, when install conversion drops at an unknown stage, or when triaging a flaky install assertion.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Build-an-X workflow that uses an LLM to map existing tests to spec sections - given a spec doc + the test suite, the LLM identifies which tests cover which sections, surfaces uncovered sections (gap), and recommends specific tests to add. Output is a coverage matrix per spec ID. Scope is mapping tests that already exist and naming the gaps, not authoring tests for new acceptance criteria. Use when a spec doc and a test suite both exist but nobody can say which requirements are actually covered - before a release sign-off, an audit, or a decision about where to spend the next round of test effort.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Generates tests from natural-language specs (acceptance criteria, user stories, requirements) using an LLM, with confidence scoring per test case (LLM self-assessment plus heuristics: assertion quality, naming, completeness), batching uncertain cases for human review, and integration with the team's existing test framework. Use when the user asks to generate unit tests from acceptance criteria, convert user stories to test cases, automate test creation from requirements, or augment a spec-driven test suite with AI-generated stubs that are then curated before merge.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

Configures Allure Report (test-runner adapter install, `allure-results` directory wiring, `categories.json` for failure classification, `history-trend.json` retention via the copy-history-between-runs pattern), runs the Allure CLI to convert `allure-results` to a static HTML site, and uploads the report as a CI artifact. Use when the team needs richer test reporting than JUnit XML - step-level attachments, per-test history, retry tracking, and severity / epic / feature labeling across framework-agnostic adapters (pytest, Jest, JUnit, TestNG, NUnit, Mocha). As a rich static HTML report generator, it is the open-source alternative to the sunset ExtentReports (JVM/.NET per-test HTML narrative); for hosted cross-run flakiness analytics rather than a static per-run report use currents-integration.

中文简介正在准备中。当前显示原文说明。

testland/qa132026年10月20日 更新

查看 testland 的全部技能

报告此技能的问题