Skip to content

Trufflehog cheatsheet

Filesystem

Search for secrets in local filesystem

trufflehog filesystem .

Only verified secrets

trufflehog filesystem –-only-verified .

Disable secret verification and update check

trufflehog filesystem --no-verification --no-update  .

Exclude files from exclude.txt file

trufflehog filesystem --no-verification --no-update -x ../exclude.txt  .

Set maximum archive size and depth

trufflehog filesystem --no-verification --no-update -x ../exclude.txt --archive-max-depth=10 --archive-max-size=20MB  .

Output in JSON format

 trufflehog filesystem --no-verification -j .

Enable debugging

trufflehog filesystem --no-verification --no-update --debug .

Git

Scan local Git repository

trufflehog git --no-verification --no-update file://.

Show only verified results

trufflehog git --no-update --only-verified file://.

Scan difference between branches

trufflehog git file://. –-only-verified –since-commit main –branch feature

Scan remote repository, with 5 concurrent workers

trufflehog git --no-update --concurrency=5 https://github.com/trufflesecurity/test_keys