File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -250,9 +250,11 @@ This would catch the specific `highlightSettings` typo but is not a general solu
250250
251251** Pattern:**
252252``` bash
253- run_check " ERROR" " MEDIUM" " User input in RegExp constructor without escaping" " hcc-008-unsafe-regexp" \
254- " -E new[[:space:]]+RegExp[[:space:]]*\\ ([^)]*\\ +[[:space:]]*[a-zA-Z_][a-zA-Z0-9_]*" \
255- " -E RegExp[[:space:]]*\\ ([^)]*\\ $\\ {[^}]*\\ }"
253+ # Note: Uses single -E with alternation (|) for BSD grep compatibility
254+ OVERRIDE_GREP_INCLUDE=" --include=*.js --include=*.jsx --include=*.ts --include=*.tsx --include=*.php"
255+ run_check " ERROR" " MEDIUM" " User input in RegExp without escaping (HCC-008)" " hcc-008-unsafe-regexp" \
256+ " -E ((new[[:space:]]+)?RegExp[[:space:]]*\\ ([^)]*[[:space:]]\\ +[[:space:]])|((new[[:space:]]+)?RegExp.*\\ $\\ {)"
257+ unset OVERRIDE_GREP_INCLUDE
256258```
257259
258260** Rationale:**
You can’t perform that action at this time.
0 commit comments