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
The injection/sql-concat security pattern uses an overly broad regex that produces false positives on comments, documentation, and non-SQL string concatenation.
Problem
The
injection/sql-concatsecurity pattern uses an overly broad regex that produces false positives on comments, documentation, and non-SQL string concatenation.Current Regex
This matches ANY line containing a SQL keyword (case-insensitive) followed by
+anywhere after it — including comments, prose, and unrelated code.False Positive Examples
// SELECT a + b FROM joinedSELECT++# SELECT all users: id + nameSELECT++// INSERT: column_a + column_bINSERT++"UPDATE total = count + 1"UPDATE++Root Cause
Same architectural issue as #483 (CORS wildcard false positive):
.mdfiles are scanned//,#,--,/*)Suggested Fix (Same 3-layer approach as #483)
"SELECT ... " +orformat!("SELECT ...") +)//,#,--,/*,*).mdskip: Already implemented viais_doc_file()in fix(scanner): narrow CORS wildcard regex + skip doc files + negation filter #484Reproduction
Related