Error unarchiving chunk
TruffleHog Version
3.61.0
Trace Output
https://gist.github.com/rotciw/e8843c9e042b2f151552808d939abe5c
Expected Behavior
Trufflehog correctly extract to find secret in the file
Actual Behavior
Got error unarchiving chunk and invalid header error. Fails to find the secret.
Steps to Reproduce
Environment
Docker image: trufflesecurity/trufflehog:3.61.0
Additional Context
Works on 3.60.4, but updating breaks the scan.
References
- #1319
Got error unarchiving chunk and invalid header error. Fails to find the secret. ... Works on 3.60.4, but updating breaks the scan.
Are you sure that these files contain secrets and that they were detected in v3.60.4? There was a bug preventing binary files from being scanned that was fixed in v3.61.0, meaning that the files in your trace wouldn't have been scanned in v3.60.4.
I see, it would make sense that these files were not scanned in v3.60.4 then.
However, that means the new binary files scan in v3.61.0 crashes when there are too many error unarchiving chunk, which ultimately kills the process with the last logs being:
"msg": "error unarchiving chunk.",
"error": "context deadline exceeded"
How could I solve an error like that?
Im also facing the same issue
We are also facing the same issue.
Hi @rotciw thanks for opening this issue. If you are still experiencing a problem would you mind providing a sample file or repo we could test against?
It seems like it does complete without crashing using the newest version, which is good 😄
There application still reports issues with the same error message: error unarchiving chunk, but does provide a better error message.
Seems like the issues are zipped files, for example we have this zip file in one of our repos which renders the same error message as initially reported.
I got the following in a filesystem check where it seemed like it had just stalled, but I left it long enough (many minutes with no logging output) and it continued.
{"level":"error","ts":"2024-05-17T20:21:49-07:00","logger":"trufflehog","msg":"error unarchiving chunk.","source_manager_worker_id":"I3U3N","unit":"/home/(user)/go/pkg/mod/github.com/vbatts/[email protected]/archive/tar/testdata/gnu-incremental.tar","unit_kind":"unit","timeout":30,"error":"error extracting archive with format: .tar: handling file: test2/sparse: context deadline exceeded"}
Looks like this should contain the file: https://github.com/vbatts/tar-split/releases