trufflehog-cli
Skill44 starsChanged 7 months agoApache-2.0View on GitHub
Perform local secret scanning, remote repository scanning, pre-commit integration, and single-credential verification using TruffleHog CLI. Triggers when the user mentions trufflehog, secret scan, leaked credential investigation, Git history scan, remote repo scan, pre-commit, or post-rotation credential verification.
In this repository24 other files it gives its agents.
- architectSkill
- clean-cacheSkill
- code-reviewSkill
- code-submitSkill
- dev-workflowSkill
- doc-writingSkill
- embed-ci-setupSkill
- gitlab-ciSkill
- gitlab-mrSkill
- grafanaSkill
- k8s-opsSkill
- local-security-checkSkill
- mock-engineSkill
- multi-worktree-devSkill
- prometheusSkill
- security-compliance-reviewSkill
- sentry-onboardingSkill
- sentrySkill
- sre-agentSkill
- story-craftsmanSkill
- terraform-auditSkill
- testing-strategySkill
- uat-story-writerSkill
- voc-analysisSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Treat this Skill as the company's standard operating manual for TruffleHog CLI.
- Distinctive: line 50
Do not extend this Skill into general-purpose SAST, dependency vulnerability scanning, or code auditing.
- Distinctive: line 61
Must use official GitHub Release binaries and verify the official checksum
- Very specific: line 62
All commands must include --no-update by default
- Distinctive: line 80
Do not load all references at once by default.
- Distinctive: line 91
Do not force the same command onto every scenario.
- Distinctive: line 95
Follow least-privilege for credentials:
- Very specific: line 98
Only escalate to read_api/api when GitLab API-level verification is needed (e.g., PAT self-check)
- Distinctive: line 99
Prefer short-lived credentials and explicitly clean up after the workflow completes
- Distinctive: line 103
Every result summary must include:
- Distinctive: line 112
Do not claim coverage of branches that were not explicitly scanned.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
trufflehog-cli
Unified entry point Skill for TruffleHog CLI in this repository.
Load modules on demand:
- Installation, version pinning, checksum verification, and temp-file strategy: install-and-baseline.md
- Local workspace + local Git history scanning: local-scan.md
- Pre-commit integration: pre-commit.md
- Remote GitLab repository scanning: remote-repo-scan.md
- Single-credential identification and verification: credential-verify.md
- Common credential types and verification patterns: credential-types.md
- JSONL report field reference: trufflehog-jsonl-format.md
For reproducible, auditable installation workflows, use the built-in scripts:
- POSIX install: install-trufflehog.sh
- PowerShell install: install-trufflehog.ps1
For pre-commit, use the built-in wrapper script:
- POSIX pre-commit wrapper: pre-commit-trufflehog.sh
Description
Treat this Skill as the company's standard operating manual for TruffleHog CLI.
It covers four primary workflows:
- Local scanning: developer workstation files and local Git history
- Pre-commit integration: block new leaks before they are committed
- Remote repository scanning: scan a single HTTPS remote repository
- Credential verification: confirm whether a leaked credential is still active
Do not extend this Skill into general-purpose SAST, dependency vulnerability scanning, or code auditing.
Rules
Rule 1 - Read the unified baseline first
Read install-and-baseline.md first.
Baseline rules apply to all workflows:
- Version is sourced from trufflehog-version.txt as the single source of truth
- Must use official GitHub Release binaries and verify the official checksum
- All commands must include
--no-updateby default - Scan artifacts go to the system temp directory, never the repository root
- Tokens must not appear in repository URLs or command-line arguments
- Reports may only use TruffleHog's
Redactedoutput; raw secret values must never be printed
Rule 2 - Select one primary workflow at a time
Determine the task type first, then load the corresponding reference:
- Local repository / developer workstation self-check: local-scan.md
- Pre-commit integration: pre-commit.md
- Remote GitLab HTTPS repository scanning: remote-repo-scan.md
- Single-credential leak investigation or post-rotation verification: credential-verify.md
Do not load all references at once by default.
Rule 3 - Match commands to scenarios
Choose the command family based on the actual scan scope:
trufflehog filesystem .: current workspace filestrufflehog git file://...: local repository historytrufflehog git <https-repo-url>: remote repository historytrufflehog analyze: only when an interactive TUI session is available
Do not force the same command onto every scenario.
Rule 4 - Least privilege first
Follow least-privilege for credentials:
- For remote repository clone scanning, prefer
read_repository - Only escalate to
read_api/apiwhen GitLab API-level verification is needed (e.g., PAT self-check) - Prefer short-lived credentials and explicitly clean up after the workflow completes
Rule 5 - Reports must clearly state scope and boundaries
Every result summary must include:
- Scan target
- Actual command family used
- Execution directory or target repository
- Result file location
- Count of
verifiedvsunknownfindings - Scope constraints (e.g.,
--branch,--since-commit,--max-depth)
Do not claim coverage of branches that were not explicitly scanned.
Examples
Bad
User says “scan the repo,” and I run a generic command, write JSON to the repo root,
output plaintext secrets, and conclude “all branches are clean.”Problems:
- Command does not match scope
- Pollutes the workspace
- Leaks sensitive information
- Conclusion exceeds actual coverage
Good
Confirm version, installation, and output strategy per the unified baseline first,
then select a single workflow with its corresponding command;
artifacts go to a temp directory, and the report clearly states what was and was not covered.Strengths:
- Single entry point + single baseline avoids duplicate maintenance
- Progressive loading keeps the main document concise
- Centralized rules simplify collaboration and auditing
- Output is traceable and does not leak sensitive information
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

