Reduce noise when running entropy checks

When there's a word on a line with high entropy, we check if the line
matches any of the regex configured on the `lineregexes` element of the
`entropy` section. If so, it's marked as a leaked.

This has reduced the number of leaks found with entropy enabled up to
80%
This commit is contained in:
Cristhian Amaya committed 2018-12-04 10:23:42 +01:00
1 parent b902d7310a
commit ea49078ffd
2 files changed
+53 -15

No files matched your search

+2 -2
View File
@@ -590,7 +590,7 @@ func TestAuditRepo(t *testing.T) {
testOpts: Options{
Entropy: 4.7,
},
numLeaks: 6,
numLeaks: 2,
},
{
repo: leaksRepo,
@@ -611,7 +611,7 @@ func TestAuditRepo(t *testing.T) {
{
repo: leaksRepo,
description: "toml entropy range",
numLeaks: 298,
numLeaks: 58,
configPath: path.Join(configsDir, "entropy"),
},
{