We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handleBinary
Please review the Community Note before submitting
HEAD
When using TruffleHog with a bare repository, the handleBinary function fails:
$ git clone git@github.com:rgmz/example.git --mirror $ trufflehog git file:///tmp/example.git/ --bare 🐷🔑🐷 TruffleHog. Unearth your secrets. 🐷🔑🐷 2024-06-23T17:52:37-04:00 info-0 trufflehog.git Using concurrency {"concurrency": 20} 2024-06-23T17:52:37-04:00 info-0 trufflehog running source {"with_units": true} 2024-06-23T17:52:37-04:00 info-0 trufflehog scanning repo {"unit": "/tmp/example.git/", "unit_kind": "dir", "path": "/tmp/example.git/"} 2024-06-23T17:52:41-04:00 error trufflehog waiting for command failed {"unit": "/tmp/example.git/", "unit_kind": "dir", "error": "error waiting for command: command=/usr/bin/git -C /tmp/example.git/.git cat-file blob 8faab40266603974595b3cbdc14d245a007fa104:example_binary.exe, stderr=fatal: cannot change to '/tmp/example.git/.git': No such file or directory\n, commit=8faab40266603974595b3cbdc14d245a007fa104: exit status 128"}
This is caused by gitDir being hard-coded as path + .git, which doesn't exist for bare repositories.
gitDir
path + .git
trufflehog/pkg/sources/git/git.go
Line 1224 in de19a39
Line 562 in de19a39
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Please review the Community Note before submitting
TruffleHog Version
HEAD
Description
When using TruffleHog with a bare repository, the
handleBinary
function fails:This is caused by
gitDir
being hard-coded aspath + .git
, which doesn't exist for bare repositories.trufflehog/pkg/sources/git/git.go
Line 1224 in de19a39
trufflehog/pkg/sources/git/git.go
Line 562 in de19a39
The text was updated successfully, but these errors were encountered: