Skip to content
vetkitChecksChangelogDocumentation

vetkit.llm-app.llm-output-sql

A query generated by a language model is executed as raw SQL. A prompt-injected request can make the model write any statement the database user is allowed to run: reading other users' rows, changing data or dropping tables.

Last updated:

Suite: AI code risks

javascript, typescript

A query generated by a language model is executed as raw SQL. A prompt-injected request can make the model write any statement the database user is allowed to run: reading other users' rows, changing data or dropping tables.

Category: LLM SECURITY · Engine rule severity: ERROR

How to fix it

Prefer letting the model pick from parameterised, pre-written queries. If free-form SQL is the feature, run it on a read-only connection restricted to the tables and rows the user may see (row level security, a dedicated role, statement timeout) and reject anything that is not a single SELECT.

References

Source: packages/engine/rules/llm-app/javascript.yml.

python

A query generated by a language model is executed as raw SQL. A prompt-injected request can make the model write any statement the database user is allowed to run: reading other users' rows, changing data or dropping tables.

Category: LLM SECURITY · Engine rule severity: ERROR

How to fix it

Prefer letting the model pick from parameterised, pre-written queries. If free-form SQL is the feature, run it on a read-only connection restricted to the tables and rows the user may see (row level security, a dedicated role, statement timeout) and reject anything that is not a single SELECT.

References

Source: packages/engine/rules/llm-app/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.