Releases: gitleaks/gitleaks
v8.23.0
Changelog
- db8e5e6 feat(generate): use multiple allowlists (#1691)
- 973c794 chore(rules): include fps in reference (#1471)
- f0d4499 Add comma as operator for GenerateSemiGenericRegex (#1679)
- ab38a46 refactor: central logger (#1692)
- b022d1c friendship ended with tines
READ THIS!!! The default gitleaks config now uses [[rules.allowlists]]
# β οΈ In v8.21.0 `[rules.allowlist]` was replaced with `[[rules.allowlists]]`.
# This change was backwards-compatible: instances of `[rules.allowlist]` still work.
#
# You can define multiple allowlists for a rule to reduce false positives.
# A finding will be ignored if _ANY_ `[[rules.allowlists]]` matches.
[[rules.allowlists]]
description = "ignore commit A"
# When multiple criteria are defined the default condition is "OR".
# e.g., this can match on |commits| OR |paths| OR |stopwords|.
condition = "OR"
commits = [ "commit-A", "commit-B"]
paths = [
'''go\.mod''',
'''go\.sum'''
]
# note: stopwords targets the extracted secret, not the entire regex match
# like 'regexes' does. (stopwords introduced in 8.8.0)
stopwords = [
'''client''',
'''endpoint''',
]
[[rules.allowlists]]
# The "AND" condition can be used to make sure all criteria match.
# e.g., this matches if |regexes| AND |paths| are satisfied.
condition = "AND"
# note: |regexes| defaults to check the _Secret_ in the finding.
# Acceptable values for |regexTarget| are "secret" (default), "match", and "line".
regexTarget = "match"
regexes = [ '''(?i)parseur[il]''' ]
paths = [ '''package-lock\.json''' ]
v8.22.1
Changelog
- b69b515 Entropy trace (#1659)
- 7357adc build: add 'toolchain' to go.mod (#1682)
- 4c3da6e refactor(detect): create readUntilSafeBoundary + add tests (#1676)
- dbe3746 twitter really does suck ass now
- 7edfc6b chore(tests): test cases for generate.go (#1623)
- efe40ca fix: only use non-empty secret groups (#1632)
- 7cb5f6f build: upgrade sprig v2->v3 (#1674)
- 2930537 fix: generate report file even if no findings (#1673)
v8.22.0
Changelog
This bumps the gitleaks binary size from around 8.5MB to 15MB but yields 2-4x speedup. Worth it imo. If you feel strongly against this change feel free to open an issue where we can discuss the tradeoffs in more depth. Credit to @ahrav
v8.21.4
v8.21.3
Changelog
- a9e6d8c go mod 1.23
- 2f73a3e Ensure keywords are downcased (#1633)
- f696605 feat: add settlemint api keys detection (#1663)
- 0bf13fc feat(dir): better chunking (#1665)
- 83e99ba feat(report): allow user-defined templates (#1650)
- e393d29 Add support for GitLab routable tokens (#1656)
- 263ce82 Add freemius secret key detection (#1611)
- 3c0e068 fix(kubernetes): only match 'kind: secret' (#1649)
- f3adda0 feat: use STDOUT when report file not specified (#1642)
- ed205a5 fix(dir): skip opening file&dir if allowlist matches (#1653)
- 6018012 fix: increase chunk size 10kb -> 100kb (#1652)
- 7f77987 feat: detect sentry.io tokens in the new format (#1640)
- 48a2e0e refactor: pre-commit hooks (#1627)
- 4e303d0 fix(easypost): only detect tokens of correct length (#1628)
- c1add1d feat(dir): continue on permission error (#1621)
- 202106a Add human readable description for curl rules (#1625)
- 8e94f98 Add option to include
Line
field in report (#1616) - dbb42a7 hm (great comment)
- 2599460 Update README.md
- 8ffb980 nop for stupid build
- 4181ad6 Add new jira api token pattern (#1601)
- 48ea14b feat: update global & generic allowlist (#1618)
- 81f0002 fix(vault-service-token): ensure that TPS contains digits (#1614)
- c11adc9 Generate comprehensive secret samples (#1484)
- d1d9054 fix(aws): detect token in url (#1615)
- 5fe58bf fix(rules): entropy, uppercase in samples (#1593)
- 5c2e813 feat: tweak rules (#1608)
v8.21.2
Changelog
- 43fae35 feat(rules): create Octopus Deploy api key (#1602)
- a158e4f fix(aws-access-token): only match if correct length (#1584)
- b6e0eee fix(config): ignore jquery/swagger w/o version (#1607)
- 722e7d8 feat: add new GitLab tokens (#1560)
- 961f2e6 feat(generic-api-key): tune false positives (#1606)
- e734fcf Create .gitleaks.toml (#1605)
- 7206d6b feat(curl): tweak tps and fps (#1603)
- 2db25f1 feat(config): ignore swagger-ui assets (#1604)
- e97695b feat(generic-api-key): exclude keywords (#1587)
- 0afb525 feat(okta): bump entropy to 4 (#1599)
- 2068870 feat: update global allowlist (#1597)
- 8cf93b9 refactor(allowlist): deduplicate commits & keywords (#1596)
- 50c2818 feat(config): ignore jquery static assets (#1595)
- 455ae0a More rule fixes (#1586)
- 5407c44 chore: log skipped symlinks (#1591)
- d03d6c4 feat: match left side of identifier (#1585)
- 851c11a what secrets?
- 8cfa6b2 fix(rules): add entropy (#1580)
- 9152eaa feat(aws): add entropy & allowlist (#1582)
- 93acc6e feat(rules): add 1password token (#1583)
- 83a5724 feat(config): add curl header rule (#1576)
v8.21.1
v8.21.0
Changelog
- aabe381 Define multiple allowlists per rule (#1496)
- 8ea6085 build: upgrade gitleaks/go-gitdiff to v0.9.1 (#1559)
- be9d0f8 Fix rule extension (#1556)
- 9988e52 Update base config allowlist (#1555)
- 8fb39ba feat(azure): detect Azure AD client secrets (#1199)
- 14c924d chore: match gitleaks.toml anywhere (#1553)
respect @rgmz @9999years
v8.20.1
Changelog
- b2fbaeb feat(config): add placeholder regexes to global allowlist (#1547)
- 00bb821 feat: add PrivateAI rule (#1548)
- 445abe3 Bump golang verion used in docker build to match version specified in go.mod (#1551)
- 1a2f656 feat: add cohere rule (#1549)
- 82d737d feat(generate): generate global (#1546)
- f6e5499 Feat/nuget config password rule (#1540)
v8.20.0
Changelog
- bf8a49f Make private key check less greedy and include fifth dash (#1440)
- 9c354f5 print tags if they exist
- 2278a2a Decode Base64 (#1488)
- c5b15c9 refactor(config): keyword map (#1538)
- a971a32 fix: use regexTarget for extend config (#1536)
- a0f2f46 feat: bump go to 1.22 (#1537)
- 4e8d7d3 fix: handle pre-commit and staged (#1533)
- f8dcd83 Bugfix/1352 incorrect report multiple lines (#1501)
Huge huge thanks to @bplaxco for supporting b64 decoding, @recreator66 for bug fixes, and to @rgmz for his continued support of the project in the form of PRs and reviews. Thanks you!
New Feature: Decoding
Sometimes secrets are encoded in a way that can make them difficult to find
with just regex. Now you can tell gitleaks to automatically find and decode
encoded text. The flag --max-decode-depth
enables this feature (the default
value "0" means the feature is disabled by default).
Recursive decoding is supported since decoded text can also contain encoded
text. The flag --max-decode-depth
sets the recursion limit. Recursion stops
when there are no new segments of encoded text to decode, so setting a really
high max depth doesn't mean it will make that many passes. It will only make as
many as it needs to decode the text. Overall, decoding only minimally increases
scan times.
The findings for encoded text differ from normal findings in the following
ways:
- The location points the bounds of the encoded text
- If the rule matches outside the encoded text, the bounds are adjusted to
include that as well
- If the rule matches outside the encoded text, the bounds are adjusted to
- The match and secret contain the decoded value
- Two tags are added
decoded:<encoding>
anddecode-depth:<depth>
Currently supported encodings:
base64
(both standard and base64url)