* Pass the entropy data back to the Leak struct
Do this to make it easier to tune entropy checks and make decisions in
systems consuming the output.
~ B'ezrat Hashem ~
* Return negative number when entropy not checked
That way you can tell the difference between not checking or an
actual entropy level of 0
~ B'ezrat Hashem ~
* Make sure to handle range checks properly
Make sure to show when something had an entropy returned but was outside
range, or didn't have a hit at all, etc...
~ B'zrat Hashem ~
* Add a few doc strings
Follow the project's conventiona add a comment above the methods
~ B'ezrat Hashem ~
* Update tests and get them to pass
~ B'ezrat Hashem ~
* Remove checked in `.got` files
~ B'ezrat Hashem ~
* Add `*.got` to the `.gitignore`
Make sure the test output files aren't checked-in
~ B'ezrat Hashem ~
Why:
* There are times where it would be nice to have a group from the regex
reported rather than the complete match.
This change addresses the need by:
* Add the reportGroup configuration option for a rule.
* Update scan.CheckRules to return the reportGroup if set.
Co-authored-by: Daniel Paul Searles <dsearles@gitlab.com>
* work in progress
* Update test configs
* adding test
* golint and change to allowlist
* fix race condition, this mistakenly got committed
* Updating tests and examples
* bump to v6 as this is a breaking change to the config
* More consistent variables
* Init refactor
* think i got it working
* we got em
* Updating tests
* fixing tests
* Better comments, more test fixing
* Bumping to v5
* Fixing golint messages
* Replacing usage of audit with scan in comments
* bumping go-git
* Updating to v5 in some other spots
* Add GCP, fix Mailgun format, and loosen format for other keys (don't require quotes)
* Add more match cases to generic credential pattern
* Fix quotation for valid toml
* Update tests
* Modified Entropy to be able to apply it on regex match or specific capture group
* Config tests
* Small fixes on entropy ranges
* Fix toml configs
Fix tests
* Start adding support for rules with filename regex
Changed how config is parsed
Created new functions to inspect files and content
* File regex working
* Fixing tests and configs
* Implemented different regex for filename and filepath
* Fix comments
* Audit tests
* Config rename vars
* Fix audit tests
* Filename offender
* Indents and code styles
* Indents and code styles
* Removing bad test repo
* Adding test repo 6 for filename and filepath tests
* global whitelist path and fixes
* Fixes on tests and new test for global whitelisting paths
* Removing unused test
* Fix comment
* Modified Entropy to be able to apply it on regex match or specific capture group
* Config tests
* Small fixes on entropy ranges
* Fix toml configs
Fix tests
* Indents and code styles