Know where your ORM stops protecting you from SQL injection
An ORM still gives you ways to write raw SQL. Look closely at those calls when input is built into the query string.
npm install --save-dev @sitecmd/cli
npx sitecmd audit .
The CLI runs on your computer or in your CI, and your code stays there.
What it finds on a demo project
The CLI flags route code that runs raw SQL built by string interpolation or concatenation.
SiteCMD CLI 2.0.0
Demo project: Product search endpoint
npx sitecmd audit .
SiteCMD Code Scan - .
Checked: November 9, 2026
Framework: Express
Issues: 1 total | critical 0 | high 1 | medium 0 | low 0
High (1)
- [Database Analysis · data] Possible string-built raw SQL in a route handler - src/routes/search.js:11
Your code passes? Now watch your site.
Keep Prisma raw query values out of SQL string building
Prisma's tagged $queryRaw and $executeRaw templates pass ordinary interpolated values as parameters. If you concatenate input into a query for an unsafe raw method, you lose that protection. Prisma's raw query guide shows both approaches.
Avoid Drizzle SQL injection through untrusted raw fragments
Drizzle's sql template turns interpolated values into parameters. sql.raw() inserts text without escaping it or processing parameters, so keep strings from requests out of raw fragments. The Drizzle SQL reference explains the difference.
Does an ORM prevent SQL injection?
Only in the queries it builds for you. On a raw query, check which part is fixed SQL, which values become parameters and which strings are inserted as SQL fragments.
Frequently asked questions
Can Prisma raw queries parameterize a table name?
No. Query parameters represent values, rather than table or column identifiers. If a feature needs to choose an identifier, map the choices you allow to SQL controlled by the server instead of accepting arbitrary text.
Review query ownership and the schema history behind it
Website security
Catch leaked API keys and exposed files before someone uses them against you.
Database migration drift in Prisma and Drizzle
Keep your local database in step with the migrations in your repository.
IDOR and tenant isolation
Look for app queries that trust an ID without checking who may use it.
AI-generated code audit: 7 mistakes before shipping
Audit AI-generated code for exposed secrets, swallowed errors, authorization gaps, unsafe SQL, reckless retries, and stale React effects.