Will It Vibe logoWill It Vibe?
INJECT-001Medium severity-8 points

SQL built with a template literal (JS/TS)

Part of Security, which counts for 30% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

A backtick SQL string interpolates a value with ${...} instead of using a driver placeholder, which is a SQL injection risk if the value is user-controlled.

Why it matters

A backtick SQL string that interpolates ${value} puts that value straight into the query text. If the value comes from a request, a crafted input can change the query and read or delete rows it should not. This is a heuristic: it fires on the interpolation pattern, so a value that is genuinely a trusted constant is a false positive.

How to fix it

Pass values as parameters, not into the string. Use your driver placeholders: $1/$2 with pg, ? with mysql2 or better-sqlite3, or the bound-parameter form of your ORM. Table and column names cannot be parameterized, so validate any dynamic identifier against a hardcoded allowlist.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Security checks