Open
Description
TruffleHog Version
trufflehog 3.88.29
Trace Output
https://gist.github.com/Hritik14/64bf5f3a62049c2b53c84055d20e5a69
Expected Behavior
since the output contains detected errors (encountered errors during scan
), exit code should be non zero
Actual Behavior
exit code is zero
Steps to Reproduce
; /opt/homebrew/bin/trufflehog git file://. --fail --json --force-skip-binaries --force-skip-archives --no-verification --no-update --since-commit this-commit-does-not-exist
{"level":"info-0","ts":"2025-06-10T23:13:39+05:30","logger":"trufflehog","msg":"Warning: The provided commit hash appears to be invalid."}
{"level":"info-0","ts":"2025-06-10T23:13:39+05:30","logger":"trufflehog","msg":"running source","source_manager_worker_id":"0YqnQ","with_units":true}
{"level":"error","ts":"2025-06-10T23:13:39+05:30","logger":"trufflehog","msg":"encountered errors during scan","errors":["error chunking dir \".\": unable to resolve ref: no base refs succeeded for base: \"this-commit-does-not-exist\""]}
{"level":"info-0","ts":"2025-06-10T23:13:39+05:30","logger":"trufflehog","msg":"finished scanning","chunks":0,"bytes":0,"verified_secrets":0,"unverified_secrets":0,"scan_duration":"35.912792ms","trufflehog_version":"3.88.29","verification_caching":{"Hits":0,"Misses":0,"HitsWasted":0,"AttemptsSaved":0,"VerificationTimeSpentMS":0}}
; echo $?
0
Environment
- OS: MacOS
- Version 15.3.2 (24D81)