Skip to content

feat: implement entropy pre-filtering to optimize secret detection#1479

Merged
ccojocar merged 1 commit intosecurego:masterfrom
oittaa:feature/entropy-pre-filtering
Jan 23, 2026
Merged

feat: implement entropy pre-filtering to optimize secret detection#1479
ccojocar merged 1 commit intosecurego:masterfrom
oittaa:feature/entropy-pre-filtering

Conversation

@oittaa
Copy link
Copy Markdown
Contributor

@oittaa oittaa commented Jan 20, 2026

Split out from #1467

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.32%. Comparing base (1216c9b) to head (6724795).
⚠️ Report is 168 commits behind head on master.

Files with missing lines Patch % Lines
rules/hardcoded_credentials.go 40.00% 5 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1479      +/-   ##
==========================================
+ Coverage   68.49%   69.32%   +0.82%     
==========================================
  Files          75       82       +7     
  Lines        4384     6601    +2217     
==========================================
+ Hits         3003     4576    +1573     
- Misses       1233     1799     +566     
- Partials      148      226      +78     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@oittaa
Copy link
Copy Markdown
Contributor Author

oittaa commented Jan 20, 2026

I made the educated guess that strings shorter than 8 characters can never hit the default entropy requirements from Zxcvbn without testing too much.

This could be improved further with Shannon entropy filtering before the much more advanced and heavier Zxcvbn. More info: #1472

@ccojocar ccojocar merged commit 5288673 into securego:master Jan 23, 2026
6 checks passed
@oittaa oittaa deleted the feature/entropy-pre-filtering branch January 25, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants