Skip to content
vetkitChecksChangelogDocumentation

vetkit.go.sql-injection.orm-request-input

Request input is placed into the SQL text of an ORM query fragment instead of being bound as a parameter (SQL injection). Affected methods include Where, Order, Group, Joins and Having.

Last updated:

Suite: Security

go

Request input is placed into the SQL text of an ORM query fragment instead of being bound as a parameter (SQL injection). Affected methods include Where, Order, Group, Joins and Having.

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Bind values with placeholders (db.Where("name = ?", name)) and map user-chosen sort columns or directions through an allow-list before passing them to Order / Group.

References

Source: packages/engine/rules/sast/go.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.