chore(deps): update pre-commit hook betterleaks/betterleaks to v1.2.0#955
Merged
Merged
Conversation
22f1f98 to
2b7c932
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v1.1.2→v1.2.0Note: The
pre-commitmanager in Renovate is not supported by thepre-commitmaintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.Release Notes
betterleaks/betterleaks (betterleaks/betterleaks)
v1.2.0Compare Source
What's New
GitHub Source
You can now scan GitHub resources natively with Betterleaks.
The GitHub source has resources that can be included or excluded w/ cli options
(--include/--exclude).Check the scanning docs for more examples.
CEL-filtering (bye bye allowlists)
Filters replace legacy allowlists, entropy checks, and token efficiency checks with dynamic Common Expression Language (CEL) statements. If a filter expression evaluates to
true, the item is skipped/discarded.prefilter: Exists only at the global level. It evaluates before any regex runs and only has access to file/commit metadata (attributes). Use this to entirely bypass binary files or bot commits.filter: Exists globally and per-rule. It evaluates after a regex match is found and has access to bothattributesand thefindingitself.Note that safe attribute access requires somewhat cumbersome syntax,
attributes.[?"key"].orValue(""). Ifkeydoes not exist in the attributes map, then it will default to using an empty string,"".Available
filterbindingsattributespath,git.sha,git.author_name,git.author_email,git.date,git.message,git.remote_url,git.platform,fs.symlink. Full list of available keys available here.findingsecret(the extracted value),match(the full regex match),line(the line of code),rule_id, anddescription.matchesAny(string, list)trueif the string matches any of the provided regex patterns.containsAny(string, list)trueif the string contains any of the provided strings (uses an efficient Aho-Corasick substring match).entropy(string)failsTokenEfficiency(string)trueif the string tokenizes too efficiently (i.e., it looks like natural language instead of a random secret).Example
filterCEL expression:Existing allowlists will still work! Internally there is a translation layer that converts allowlists to equivalent CEL expressions.
One of the coolest things about moving towards CEL for filtering is now we can filter on source specific attributes without changing anything in the filtering engine itself. You just have to set attributes in the source if you're authoring a new source. So for example, since we added a new GitHub source with this release, we can filter on GitHub source attributes like this:
In this example prefilter, we are telling the engine (in the github.go source specifically, to bail out early and not download or scan the v1.2.0 release).
Changelog
ff43d2aDynamic attributes (prep work for more sources) andRun()entry (better api) (#92)007410eFeat/cel filters (#100)7f689bbGitHub source + tweaks (#115)42d8f28Update build command in README (#90)3947777feat(rule): add MongoDB connection string (#94)296fee3fix up validation filtering (#116)baf13cbfix: do not crash when workers exceed commits (#99)0a41896fix: do not pass filenames to betterleaks (#91)c65402bovhcloud rules, make crypto bindings consistent (#102)267028dpromote validation (#84)6208265that perp skerp (#95)Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.