* Reimplement the ability to override built-in rules
PR #1524 broke the ability to specify a `[[rules]]` with the same ID as
a built-in rule in order to extend the default configuration.
This PR restores this ability, but merges the provided configuration
with the default rule instead of overwriting the default rule wholesale.
* Add tests
* Append keywords and tags
* Support base64 decoding during scans
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
* Add failing tests for the case when the match starts outside the decoded value
* Align locations for overlapping, encoded matches
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
* Add --max-decode-depth flag and update README help output
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
* Move keywords off of fragment
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
* Fix comment typo
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
* Refactor how keywords are used in detect
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
* Clarify comments and rename method to match
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
* Improve performance
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
* Fix issues after rebase
Only adjust matchIndex to fix the following line issue when not working
with encoded segments since they handle adjusting the index themselves.
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
* Update detect/decoder.go
Don't escape characters that don't need escaping
Co-authored-by: Richard Gomez <32133502+rgmz@users.noreply.github.com>
* Update flag help text
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
* Add meta data tags from decoding
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
---------
Co-authored-by: Richard Gomez <32133502+rgmz@users.noreply.github.com>
* fix: use regexTarget for extend config
* fix: add keywords from base and extended rule into global keywords list
* docs: add an example to extend default rules
* chore: update project URL references
* Remove IAM identifiers for non-credential resources
Only detects:
AWS STS service bearer token
Context-specific credential
Access key
Temporary (AWS STS) access key IDs use this prefix, but are unique only in combination with the secret access key and the session token.
* Update gitleaks.toml
* Update testdata
* Update tests
* Add sidekiq rules
* Added two new rules for sidekiq
* Other: Add keywords to square rules per Zach's instructions
* Validate now works, but test suite is failing
* Tests are now passing
* Add Sidekiq Rules: Ran go fmt
* * After resolving conflicts, had to rerun the rule generator to add back the semicolon char
* After running tests, had to fix one line in testdata/expected/report/sarif_simple.sarif
* * Added keywords to simple.toml for sidekiq-sensitive-url so that the rule matches what is in gitleaks.toml
Co-authored-by: Andrew Weiner <aweiner@frontrush.com>
* init
* working on default and path config extensions
* adding trace log level, consolidating some code
* cleaning things up, updating generate package
* fix tests
* formatting
* adding tests for extend
* extend not extends
* formatting
* only allow usedefault or path to be set
* update readme
* add note about allowlists
* more readme, expand env var for path
* actually dont support env var. ez attack