Skip to content

Convert go sqli rule to taint mode to reduce false-positives

Michael Henriksen requested to merge fix/issue-451108/sqli-fp into main

What does this MR do?

Converts the concat-sqli Go rule to taint mode to reduce false-positives

The previous rule would flag occurrences of fmt.Sprintf(...) if the format argument contained a SQL query keyword such as select, update, insert, etc. The rule seemed to be attempting to emulate a taint mode flow, but it FP'ed because of the lack of distinction between source and sink patterns in the regular rule mode.

Playground: https://semgrep.dev/playground/s/KxJwn

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Edited by Michael Henriksen

Merge request reports