DELETE statement with no WHERE clause
Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 15 points from that category, once per scan, no matter how many places it turns up.
What it detects
A DELETE FROM statement has no WHERE clause anywhere before its terminating semicolon, so it removes every row in the table. This is almost always an accidental omission rather than an intended full wipe.
Why it matters
A DELETE FROM with no WHERE clause removes every row in the table. Like an unscoped UPDATE, this typically runs unattended as part of a migration or deploy pipeline, so nothing stops it before it deletes production data, and recovery depends entirely on having a recent backup.
How to fix it
Add a WHERE clause that scopes the delete to the rows you intend to remove. If the goal really is to empty the table, prefer TRUNCATE (which makes the full-wipe intent explicit and is usually faster) or add a comment and a safety check so a reviewer can see the full deletion was deliberate.
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