Fix a false positive in regexp rule
This MR is based upon !62 (closed) which has the following description. This MR adds a CHANGELOG and tests.
What does this MR do?
This comment will fix a false positive in the gitlab.eslint.detect-non-literal-regexp
rule. After running semgrep and eslint rules on the (lodash)[https://github.com/lodash/lodash/commit/2f79053d7bc7c9c9561a30dda202b3dcd2b72b90] repository, semgrep flagged on (this)[https://github.com/lodash/lodash/blob/2f79053d7bc7c9c9561a30dda202b3dcd2b72b90/test/merge.test.js#L201] codeline that eslint did not flag on. This is a false positive because we are only concerned about calls to new Regexp
that have an argument passed into the call.
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 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