Open rgmz opened 5 months ago
It seems that git.scanDir
returns an error (repository does not exist
), however, the error seems to vanish into a void.
Confusingly, scanDirs
and scanRepos
โ which would log such an error โ don't seem to run in any configuration I tested. They only get called runWithoutUnits
.
I have raised a PR for this @rgmz , please check
The directory not existing should probably be a fatal error though.
ยป ./trufflehog git file:///tmp/fake-dir/
๐ท๐๐ท TruffleHog. Unearth your secrets. ๐ท๐๐ท
2024-11-14T23:34:31-08:00 info-0 trufflehog running source {"source_manager_worker_id": "FdwKg", "with_units": true}
2024-11-14T23:34:31-08:00 error trufflehog encountered errors during scan {"errors": ["error chunking dir \"/tmp/fake-dir/\": repository does not exist"]}
2024-11-14T23:34:31-08:00 info-0 trufflehog finished scanning {"chunks": 0, "bytes": 0, "verified_secrets": 0, "unverified_secrets": 0, "scan_duration": "31.771833ms", "trufflehog_version": "dev"}
Please review the Community Note before submitting
TruffleHog Version
HEAD
Description
When using TruffleHog with a
file://
uri, the scan will complete with a 0 exit code even if the directory doesn't exist.