Skip to content

Commit f58910f

Browse files
authored
Merge pull request #15 from decksoftware/fix/bare-nosemgrep-regexp
fix(security): bare nosemgrep for the glob-matcher RegExp (CI rule-id resolution)
2 parents ef8e8e3 + 38b3b9f commit f58910f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

csreview/src/ignore.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ export function patternToMatcher(rawPattern) {
103103
// user's own .csreview-ignore or built-in defaults (a local dev tool), and the
104104
// behaviour is unit-tested (ignore.test.js "ReDoS H1"). The dynamic RegExp is
105105
// intrinsic to a glob matcher, so this audit finding is suppressed inline.
106-
return { negate, re: new RegExp(prefix + body + suffix) }; // nosemgrep: javascript.lang.security.audit.detect-non-literal-regexp.detect-non-literal-regexp
106+
// Bare nosemgrep (not rule-id-scoped) so the suppression is robust to how the
107+
// CI's `--config auto` resolves the rule's internal id.
108+
return { negate, re: new RegExp(prefix + body + suffix) }; // nosemgrep
107109
}
108110

109111
/**

0 commit comments

Comments
 (0)