* Adding a bunch of new rules, update allowlist to include node_modules and vendor folders, extend helper config functions
* remove ssns from allowlist since default config does not detect ssn
* Adding a bunch of new rules, update allowlist to include node_modules and vendor folders, extend helper config functions
* use func instead of function in stopwords
This improves the PlanetScale token detection. It add some flexibility
in length. There is no guarantee that the length is always 43 characters
(in fact, it's very likely to change a bit soon).
Additionally, it adds support for detecting oauth tokens as well.
* gitlab pats may contain underscores as well as dashes
* include testdata index binary
Co-authored-by: Greg Johnson (codeEmitter) <gjohnson@gitlab.com>
Regexps for default Twitter rules ("Twitter Secret Key" and "Twitter Client
ID") have a small flaw that make the default configuration vulnerable to
some false-positives.
I believe these rules should detect the cases like (SOME_CLIENT_ID should
be longer):
```
"twitter_client_id": "SOME_CLIENT_ID"
```
However, currently the twitter rules also detect the false positives for the
cases like:
```
someObj := twitter.NewObjectWithALongName()
config.Twitter.DomainAccessToken
```
I'm trying to address this issue the similar way it's done for facebook client
ids and AWS secret keys, where the secret is expected to be quoted.
* 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 ~