Fix broken regular expressions causing false negatives
What does this MR do?
This MR does the following:
- Fixes broken regexes that prevented certain passwords ending in a hyphen from matching.
- Adds more tests to increase test coverage related to passwords appearing inside text.
- Eliminates a flaky test in TestGitleaksTOMLRegexp that was failing
20% - 27%
of the time.
What are the relevant issue numbers?
- Fix broken gitleaks regular expressions in secr... (gitlab-org/gitlab#458626 - closed) • Adam Cohen • 17.2
- Increase test coverage of secret patterns with ... (gitlab-org/gitlab#467617 - closed) • rossfuhrman • 17.2
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 Adam Cohen