Add word boundaries to Meta tokens
What does this MR do?
!190 (merged) is causing a substantial increase in false positives due to the lax nature of the expressions. This MR adds a leading word boundary \b
and trailing boundary ['|\"|\n|\r|\s|\x60]
to constrain each pattern. The trailing boundary was taken from existing rules in gitleaks.toml
.
This MR itself has an example of a false positive that the revised patterns would ignore:
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added -
If you are adding a new rule, a link to a regex101 example is included in the description -
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 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 Lucas Charles