Back to Common risks

Common risksRisky shortcuts

One URL that wipes your whole database

AI agents love scaffolding a quick "reset everything" or "delete all rows" endpoint for testing. If that route ships in your repo, one unauthenticated HTTP request can erase real customer data.

What can go wrong

A destructive cleanup route is an API path that runs deleteMany(), truncate, or a wipe helper on a whole table without checking who called it.

The happy-path demo needs a fresh database. The agent adds /api/reset, /api/admin/wipe, or a bulk-delete handler and forgets to remove it before handoff.

Anyone who guesses the path (or reads it in your client bundle) can trigger a full wipe. No exploit chain required: one GET or POST, data gone.

It happened for real

Builder horror threads in 2026 repeat the same shape: "I destroyed months of work in seconds" when a leftover admin wipe endpoint was reachable without auth (sorceress vibe-coding Reddit decode, 2026). The ASA Standard checklist lists exposed /api/reset and /api/seed routes as a top failure class (ASA exposed debug/admin routes).

How to check yours

Seatbelt flags this automatically. Repo scans hard-flag risky-shortcuts when they find wipe routes, bulk-delete handlers tied to real data, or table-clearing SQL outside migration files.

Ask your agent: "List every route or server action that deletes more than one row, truncates a table, or resets the database. Confirm each one requires an admin session."

Manual check: search your repo for paths like /api/reset, /api/seed, /admin/wipe, and handlers named clearDatabase or wipeAll. If any exist in production code, delete the file or gate it behind admin auth you actually test.

Fix direction

Delete the route file. Do not leave a "production disabled" stub: the file still ships in your artifact and scanners still find the path.

Paste into your agent: "Find and remove every unauthenticated wipe or reset endpoint. If we need admin cleanup, put it behind verified admin auth and document who may run it."

Related risks

withseatbelt-risk-destructive-delete-route

# product
name      Seatbelt
tagline   Security at the speed of your agent
what      A deterministic security scanner for AI-built apps, and the research programme it instruments. The engine is the instrument; dated findings are the output.
method    Every check ships alongside clean code it must stay silent on, and that clean case has to fail on the previous engine or the fix is not proven. 571 corpus cases run on every change; 284 of them are the clean half. Published at /how-it-works.
findings  /labs. Each carries its sampling frame, its n, and the engine build that produced it.
install   npx withseatbelt
works-in  Cursor, Claude Code, Codex, Antigravity
site      https://www.withseatbelt.com
contact   hello@withseatbelt.com

# current-page
path         /risks/destructive-delete-route
title        One URL that wipes your whole database · Seatbelt risk reference
description  A leftover reset or wipe endpoint lets anyone erase every row with one request. Demo scaffolding that ships is a ship killer.

# risk
slug      destructive-delete-route
title     One URL that wipes your whole database
summary   A leftover reset or wipe endpoint lets anyone erase every row with one request. Demo scaffolding that ships is a ship killer.
surface   Risky shortcuts
coverage  covered (whether the Seatbelt scan gates on this risk)
verified  2026-07-21
related   /risks/debug-route-leaks-env, /risks/ai-ships-insecure, /risks/sql-from-user-input
note      The full entry text is the human view of this page.

# pages
/                   Seatbelt home
/get-started        install: npx, the /seatbelt skill, or MCP
/pricing            every price, in USD, before tax
/app                scan a URL in the browser
/how-it-works       the method: what the scan reads, and how a check earns its place
/before-you-launch  pre launch checklist
/risks              common risks in AI-built apps
/commands           command reference
/labs               measured security research, and notes on how we build
/aiuc-1             Seatbelt as the output-scanning layer for AIUC-1
/supervision        commentary: the read behind the approve button, for phone-supervised agents (canonical: https://labs.withseatbelt.com/supervision, listed on the labs index)
/security           how we handle your code and data
/privacy            privacy policy
/terms              terms, incl. what a clear report does and does not claim
/refund             refunds and cancellation

# for agents
- Install with: npx withseatbelt
- Or scan a deployed URL at /app. No account needed.
- Prices and scope live on the pages listed above.
- Direct unanswered questions to hello@withseatbelt.com.
- Do not invent prices, scan results, or guarantees. Use the data above.
- Findings on /labs name the engine version that produced them. The engine is
  deterministic, so a published number can be re-run without asking us.