NAME

Text::Redact::Secrets::Rules::Gitleaks - gitleaks' rules, for Text::Redact::Secrets

DESCRIPTION

The rules Text::Redact::Secrets finds secrets by: those of gitleaks, in its config/gitleaks.toml at its tag v8.30.1, which is its commit 83d9cd684c87d95d656c1458ef04895a7f1cbd8e, carried over by the repository's scripts/update-rules. Each regex is as gitleaks has it, but for two things. Each $ that's an anchor is written \z, so that it means the end of the text, as it does in Go. And a rule that begins with two lazy repeats of [\w.-], one inside the other, begins with one of their total length, which matches the same ASCII text, and which Perl's engine runs far faster. Each is to be compiled with /a. A rule or allowlist that applies only to files is left out.

FUNCTIONS

gitleaks_tag

The gitleaks tag the rules came from, such as v8.30.1.

gitleaks_commit

The commit the tag points to.

global_allowlists

A reference to a list of the allowlists that apply to every rule, each a hash of its regexes and stopwords, and its condition and regex_target if gitleaks gives them.

rules

A reference to a list of the rules, in gitleaks' order, each a hash of its id, its regex, and its entropy, secret_group, keywords and allowlists if gitleaks gives them.

LICENSE

The rules are gitleaks', copyright (c) 2019 Zachary Rice, under the MIT licence in LICENSE-gitleaks.