TruffleHog Secret scanner
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
trufflehog git file://.
trufflehog filesystem <path>
trufflehog github --org=<org>
--results=verified
--json--no-verification
--failtrufflehog analyze
Concepts
- Source git, files, S3...
- Detectors regex + keywords
- Verify call provider API
- Result verified / unknown / unverified
Scan sources
trufflehog git <uri>
trufflehog git file://.
trufflehog filesystem <path>...
trufflehog github --org=<org>
trufflehog github --repo=<url>
trufflehog gitlab --token=<token>
trufflehog docker --image <image>
trufflehog s3 --bucket=<name>
<cmd> | trufflehog stdin
trufflehog multi-scan --config <file>
Git and GitHub options
--since-commit <ref>
--branch <name>
--issue-comments
--pr-comments--exclude-archived
--token <token>
Results and output
--results=verified
--results=verified,unknown
--results=unverified
--json / -j--sarif--no-verification
--fail--no-update--log-level <n>
Detectors and filters
--include-detectors <names>
--exclude-detectors <names>
--filter-entropy <n>
--config <file>
trufflehog:ignore
--no-ignore-tag--force-skip-binaries
--force-skip-archives
--concurrency <n>
Analyze and install
trufflehog analyze
trufflehog help <command>
trufflehog --version
brew install trufflehog
docker run --rm -it -v "$PWD:/pwd"
trufflesecurity/trufflehog:latest github --repo
<url>
curl -sSfL <install.sh URL> | sh -s -- -b
/usr/local/bin
CI
uses: trufflesecurity/trufflehog@main
extra_args: --results=verified,unknown
trufflehog git file://. --since-commit main --branch
<b> --fail
trufflehog filesystem . --sarif --no-verification
Recipes
trufflehog git https://github.com/<org>/<repo> \ --results=verified --json > findings.json
# checkout with full historytrufflehog git file://. --since-commit main \ --branch HEAD --results=verified,unknown --fail
trufflehog github --org=<org> --token=$GITHUB_TOKEN \ --issue-comments --pr-comments --exclude-archived \ --results=verified,unknown --json > org.json
trufflehog filesystem . --no-verification --sarif > results.sarif



