You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(engine): eliminate false positives from invalid regex fallback (#24)
Go's RE2 does not support negative lookahead. Two rules (JS-014 and
K8S-003) used `(?!...)` patterns that failed to compile and fell back
to `$^`, which still matches empty strings, causing findings on every
blank line. Reported in issue #24 on plain Next.js config files.
- mustCompile: replace `$^` fallback with `[^\s\S]` (truly never matches)
- JS-014: rewrite using Pattern `.then(` + AntiPattern `.catch(`, reusing
the existing AntiPattern mechanism
- K8S-003: remove the rule; its multi-line YAML check cannot be
expressed in RE2 and the engine scans line-by-line. Will return when
a YAML-aware check lands.
Closes#24
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments