Custom RegEx for Secrets
How to create custom regex rules that detect secrets specific to your Organization
Snyk Secrets lets you define custom regular expressions (regex) to detect secrets that are specific to your Organization, such as database passwords. You can scope a custom regex rule to a Group or one or more Organizations.
Prerequisite
To create a custom regex rule, you need the necessary permissions:
group.rule_extension.read
View Rule Extensions
See the rule extensions (including Secrets custom regexes) in the group
group.rule_extension.create
Create Rule Extensions
Add new rule extensions in the group
group.rule_extension.edit
Edit Rule Extensions
Change existing rule extensions in the group
group.rule_extension.delete
Delete Rule Extensions
Permanently remove rule extensions from the group
Refer to user role management for further information on configuring custom roles.
Create a custom regex rule
Navigate to Group settings > Snyk Secrets. The Custom RegEx Rules section appears.
Click + New Rule.
In the RegEx pattern field, enter your regex pattern.
Optionally, add sample strings to the Test strings box to validate the pattern.
Optionally, add a description in the Description box.
Click Save Draft.
Select the Group or one or more Organizations for the rule scope.
Click Save and activate.
Last updated
Was this helpful?

