-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
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
Secrets are reported on the wrong line #1876
Comments
I just tested, and this problem persists even with #1891 merged. |
#1891 appears to be fixing an off-by-one error - not whatever's causing this. |
This appears to be coming from the Chunker logic. A quick change of
|
If bumping
Also, presumably the Chunker was implemented for performance reasons (I'm guessing because there are so many detectors that are each running their own regex matching per chunk?) - what implications does bumping from 10KiB to 100KiB have for that? |
) Since we're waiting on trufflesecurity/trufflehog#1876 to merge #531
Here's another repro:
|
The reason for this is that |
What is "this" in the context of your reply? The question I'm looking to answer is "why does |
) Since we're waiting on trufflesecurity/trufflehog#1876 to merge #531
Has the same issue via filesystem mode. Line number calculation is wrong. Version 3.75.1 |
Community Note
TruffleHog Version
3.59.0 (and older versions)
Trace Output
https://gist.github.com/det/080c98039750a5296c6856efaaed8b5c
Expected Behavior
Secret should be reported on line 557
Actual Behavior
Secret is reported on line 287 (and a different wrong line number on older versions of trufflehog)
Steps to Reproduce
wget https://gist.githubusercontent.com/det/1526b4c16d0e07ac023d75c912a68658/raw/c3061c14a811205a65cbdcf0065bd3c11d88bfcb/test.txt
trufflehog filesystem test.txt
Environment
References
May be related to #1537
The text was updated successfully, but these errors were encountered: