Skip to content
vetkitChecksChangelogDocumentation

vetkit.py.sql-injection.string-building

SQL executed from a string built with %, .format(), f-strings or concatenation. This is vulnerable to SQL injection.

Last updated:

Suite: Security

python

SQL executed from a string built with %, .format(), f-strings or concatenation. This is vulnerable to SQL injection.

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Pass parameters separately: cursor.execute("... WHERE id = %s", (value,)).

References

Source: packages/engine/rules/sast/python.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.