Draft: Speed up eslint.detect-object-injection
What does this MR do?
Speeds up eslint.detect-object-injection.
This rule included matches for all lines following any variable assignment, which would match basically all code in most files. In addition, the metavariable regex for numeric literals was broken, causing Semgrep to ignore any metavariable regex for "$V".
Here I instead leverage constant propagation and metavariable typing to exclude numeric literal indexing.
** NOTE **: This MR will not pass tests until the Semgrep version is upgraded from 0.39 to 0.51.
This reduced run time on a test project from 8 minutes to 40 seconds.
What are the relevant issue numbers?
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 Nathan Brahms