Test our custom gitleaks configuration
What does this MR do?
In !221 (comment 1415815305), @jamesliu-gitlab
mentioned that some of our custom regular expressions defined in gitleaks.toml ensure that the tokens are not matched when they're part of a longer string, but are matched when they are part of an assign statement. For example, for the fake token:
sk-000000000000000000000000000000000000000000000000
should not be matched when it's enclosed in a long string
RANDOMTEXTsk-000000000000000000000000000000000000000000000000RANDOMTEXT
but should match when included in an assignment
password="sk-000000000000000000000000000000000000000000000000"
Seeing this, I wondered if this should be the case for all of our custom regular expressions, and if so, can we enforce this with code.
What are the relevant issue numbers?
N/A
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests updated/added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Craig Smith