Last active
August 25, 2026 13:21
-
-
Save posquit0/60c94875200e7b4a3a1b9bd453c01555 to your computer and use it in GitHub Desktop.
Anonymized TruffleHog pathFromBinaryLine panic trace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TruffleHog 3.97.0 | |
| panic: runtime error: slice bounds out of range [:-7] | |
| goroutine 1 [running]: | |
| github.com/trufflesecurity/trufflehog/v3/pkg/gitparse.pathFromBinaryLine(...) | |
| pkg/gitparse/gitparse.go | |
| github.com/trufflesecurity/trufflehog/v3/pkg/gitparse.TestBinaryPathParseMalformedLine(...) | |
| pkg/gitparse/gitparse_test.go | |
| Minimal input: | |
| []byte("Binary files /dev/null and b/\n") | |
| The parser finds ` and b/`, then evaluates `after[:len(after)-8]` while | |
| `after` contains only the trailing newline. The expected behavior is to reject | |
| the malformed/truncated line without panicking. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment