Skip to content

Releases: gitleaks/gitleaks

v8.18.2

01 Feb 17:08
ac4b514
Compare
Choose a tag to compare

Changelog

  • ac4b514 removed gitleaks user from Dockerfile (#1313)
  • 76c9e31 Remove IAM identifiers for non-credential resources in the aws-access-token rule (#1307)
  • afe046b Update stripe rule to not alert on publishable keys (#1320)
  • 8b8920d --max-target-megabytes flag now supported for --no-git flag as well (#1330)
  • a59289c add pre-commit hook gitleaks-system (#1225)
  • 870194b fix errors when using protect and an external git diff tool (#1318)
  • 179c607 rename filesystem to directory (#1317)
  • 8de8938 Enhance Secret Descriptions (#1300)
  • ca7aa14 Small refactor detect and sources (#1297)
  • 01e60c8 chore(config): refactor to go generate; simplify configRules init (#1295)
  • 54f5f04 forgot symlinks
  • 221d5c4 pretty apparent 'protect' and 'detect' should be merged into one command (#1294)
  • 128b50f style: sort the stopwords (#1289)

v8.18.1

17 Nov 20:58
dab7d02
Compare
Choose a tag to compare

Changelog

v8.18.0

22 Aug 19:33
4526655
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v8.17.0...v8.18.0

v8.17.0

15 Jun 12:50
7804d65
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v8.16.4...v8.17.0

v8.16.4

06 Jun 18:32
6f75511
Compare
Choose a tag to compare

Changelog

v8.16.3

19 Apr 17:32
51ca0f8
Compare
Choose a tag to compare

Changelog

Huuuuuge thank you to all the contributors especially @rgmz

@edwardwang888 @wparad @sadikkuzu @RafaelFigueiredo @fgreinacher @jasikpark @sergiomarotco

v8.16.2

30 Mar 13:24
63c3076
Compare
Choose a tag to compare

Changelog

Thanks to @americanair for sponsoring this open source project!

Thanks to all the contributors this release: @fgreinacher @wparad @RafaelFigueiredo @sergiomarotco @jasikpark

v8.16.1

14 Mar 17:18
1fb3a77
Compare
Choose a tag to compare

Changelog

v8.16.0

26 Feb 15:04
4b5e8e1
Compare
Choose a tag to compare

Changelog

Allowlist Regex Targets

Let's use the generic rule to demonstrate the new regexTarget allowlist option

[[rules]]
description = "Generic API Key"
id = "generic-api-key"
regex = '''(?i)(?:key|api|token|secret|client|passwd|password|auth|access)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
entropy = 3.5
keywords = [
    "key","api","token","secret","client","passwd","password","auth","access",
]

example.txt will be our target and contain a single line with a fake secret:

var discord_client_secret = '8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ'

Running gitleaks on this file using the generic rule will return one finding:

gitleaks detect --source=example.txt --no-git -v --config=example.toml

    β—‹
    β”‚β•²
    β”‚ β—‹
    β—‹ β–‘
    β–‘    gitleaks

Finding:     discord_client_secret = '8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ'
Secret:      8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ
RuleID:      generic-api-key
Entropy:     4.413910
File:        example.txt
Line:        1
Fingerprint: example.txt:generic-api-key:1

We can add a allowlist regexes entry to include part of the secret. This will cause gitleaks to ignore the finding above.
Note that by default gitleaks uses the Secret to compare against allowlist regexes.

Adding the following allowlist to the generic rule will cause gitleaks to ignore the finding:

[rules.allowlist]
regexes = ["vV"]

But now say you don't want to use Secret to compare against your allowlist regexes. Well, now you can use regexTarget and set the value as either line or match to compare against the line or regex match:

[rules.allowlist]
regexTarget = "match"
regexes = ["discord"]

and

[rules.allowlist]
regexTarget = "line"
regexes = ["var"]

will both result in the finding being ignored because discord is found in the generic rule regex match and var is in the line where the finding was found.

In addition to rule allowlists, you can set regexTarget in the global allowlist:

[allowlist]
regexTarget = "line"
regexes = ["var"]

Thanks @bplaxco for the review

v8.15.4

25 Feb 15:13
343e693
Compare
Choose a tag to compare

Changelog

  • 343e693 ignore package-lock.json (#1076)
  • 0060ab6 Fix typos in README.md and CONTRIBUTING.md (#1090)
  • 0259088 fix: ignore baseline if path was not relative in source (#1101)
  • 088f8b8 Fix H in GitHub and update pre-commit rev tag in README (#1087)

Shouts outs to @sandyydk @raffis @lawndoc @sadikkuzu