- How you use it
- You ask for it
- What it can do
- writes files · runs shell
- What's inside
The option
| Option | ASkill · v1.0.0SQL bound-value review fixture |
|---|---|
| How you use it | You ask for it |
| What it can do | writes files · runs shell |
| What's inside |
What this thread does
The symptom
Suppose your coding agent wrote a backend where the SQL text is a template string with the user's value pasted inside, for example SELECT * FROM users WHERE id = ${req.params.id}. OWASP describes SQL injection as untrusted data becoming part of the query's SQL syntax and changing its logic.
What the sources say
- OWASP's Query Parameterization Cheat Sheet says SQL injection is best prevented with parameterized queries, and that the parameterization must happen on the server side. It warns that many client-side libraries build the query by string concatenation before sending it, so our recommendation is to check that your database API binds values rather than concatenating them into SQL text.
What to do
1. Our recommendation: ask the agent to list every place that builds SQL from a variable. Search the code yourself for SELECT, INSERT, UPDATE, DELETE next to a template literal, an f-string, a + or a .format( as a starting point; also review query construction directly. 2. Our recommendation: rewrite each one with placeholders and pass the values separately. Common forms: $1 with an array in node-postgres, ? in Python's sqlite3, %s with a tuple in psycopg. MySQL Connector/Python uses %s or %(name)s with a tuple or dictionary. Your driver's docs show the exact syntax; OWASP's page shows Java, .NET, Ruby, PHP, Perl and Rust. 3. Table names, column names and ORDER BY direction cannot be value placeholders. OWASP's SQL Injection Prevention Cheat Sheet says to keep these choices fixed in code where possible, or map user choices to a strict allow-list of application-owned values. 4. Our recommendation: if an ORM is in use, check any raw-query escape hatch the same way. ORM query languages also need bound parameters. 5. Our recommendation: add regression tests that send a value containing a single quote and an ' OR '1'='1 string through each endpoint. Assert the intended literal-value behavior or validation error, with no unintended extra rows; also inspect parameter binding.
A prompt to try as a starting point
Our recommendation (untried): "List every database query in this repo that includes a variable in the SQL text. For each, show the file and line, then rewrite it with bound parameters. Do not change behavior. Add a test per endpoint that sends a quote character and an OR 1=1 string."
Common mistakes
Our recommendation: watch for these during review.
- Escaping quotes by hand instead of using placeholders.
- Fixing the obvious
WHEREclause but leavingORDER BY ${sort}orLIMIT ${n}open. - Trusting validation on the frontend only.
- Reading the diff for "looks parameterized" without inspecting binding and running regression tests.
Caveats
I have not run these steps myself; the factual guidance comes from OWASP and the linked driver docs, read 2026-11-30. Our recommendation: use quote tests as regression checks alongside inspection of parameter binding; do not treat a passing quote test as proof that every query is safe.
Sources
Read 2026-11-30: OWASP's Query Parameterization Cheat Sheet for server-side parameterization and language examples; OWASP's SQL Injection Prevention Cheat Sheet for bound values, identifier allow-lists and ORM query languages.
Driver syntax: node-postgres queries, Python sqlite3 placeholders, psycopg parameters, and MySQL Connector/Python execute(). No endpoint tests or prompts were run.
Started from a post by @DiscussionHealthy802 (r/vibecoding); OWASP, packaged by the editor. Original post
- 01 · YouPaste the line from Try it into your agent.
- 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
- 03 · YouApprove a one-line report. Nothing is posted without you.