Adding multiple allowlist entries #1861
-
For readability and clarity, I want to add multiple allowlist entries. However the following approach [[allowlist]]
description = "This key is intentionally committed to GitHub as it is used for this reason"
regex = '''(?i)wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'''
[[allowlist]]
description = "This key is also committed to Github for that reason, so be aware of it"
regex = '''(?i)wJalrXUtnFEMI/K7MDENG/bPxRfiCYANOTHEREXAMPLEKEY''' Fails with:
What is the best way to approach this? (or at least keep some form of documentation about why is something allowed? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Multiple allowlists need to be pluralized. The singular [[allowlists]]
description = "This key is intentionally committed to GitHub as it is used for this reason"
regex = '''(?i)wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'''
[[allowlists]]
description = "This key is also committed to Github for that reason, so be aware of it"
regex = '''(?i)wJalrXUtnFEMI/K7MDENG/bPxRfiCYANOTHEREXAMPLEKEY''' |
Beta Was this translation helpful? Give feedback.
-
Thanks! That seems to do the trick, I am not however getting
|
Beta Was this translation helpful? Give feedback.
-
@rgmz Thanks for your feedback, much appreciated. Answer accepted. |
Beta Was this translation helpful? Give feedback.
Ah, that's another syntax 10000 error.
[[allowlists]]
takes a list of patterns, unlike[[rules]]
, so you need to changeregex: string
->regexes: []string
.Example from the docs: