10000 Adding multiple allowlist entries · gitleaks gitleaks · Discussion #1861 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Adding multiple allowlist entries #1861

Closed Answered by rgmz
pantelis-karamolegkos asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, that's another syntax 10000 error. [[allowlists]] takes a list of patterns, unlike [[rules]], so you need to change regex: string -> regexes: []string.

[[allowlists]]
description = "This key is also committed to Github for that reason, so be aware of it"
-regex = '''(?i)wJalrXUtnFEMI/K7MDENG/bPxRfiCYANOTHEREXAMPLEKEY'''
+regexes = ['''(?i)wJalrXUtnFEMI/K7MDENG/bPxRfiCYANOTHEREXAMPLEKEY''']

Example from the docs:

[[allowlists]]
description = "global allow list"
commits = [ "commit-A", "commit-B", "commit-C"]
paths = [
  '''gitleaks\.toml''',
  '''(.*?)(jpg|gif|doc)'''
]
# note: (global) regexTarget defaults to check the _Secret_ in the finding.
# Acceptable values for regexTarget are "match"…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rgmz
Comment options

Answer selected by pantelis-karamolegkos
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
0