Shared taxonomy
The AI-code failure catalogue
What breaks in code written with AI tools, with a source for each entry. The checklist starts here: every item maps to at least one pattern, and every pattern names the item that catches it.
Termsrow-level security (database rules that decide which rows each signed-in user may read or write) · client bundle (the JavaScript your app sends to the browser or ships inside the mobile app; anyone can read it) · webhook (a message a provider such as Stripe sends to your server when something happens, like a payment) · security headers (HTTP response headers (HSTS, content-type, frame policy) that switch on the browser's built-in protections) · cross-site scripting (user-typed text rendered as markup, so a script in a name or comment runs in other users' browsers) · server-side request forgery (the server made to fetch an attacker-chosen URL, reaching internal services) · cross-site request forgery (another site making a user's browser send a state-changing request with the user's cookies) · LLM feature (a product feature that calls a large language model, such as an assistant or a summariser)
Patterns
56
Critical
23
High
22
Medium
11
A pattern (a recurring, named way code fails, described independently of any one tool) here is not a claim that a tool is bad. It is a description of what a tester looks for, why AI-assisted code produces it more often than hand-written code in the samples that have been measured, and how to detect it. Two of those samples: 45% of generated code samples across 100+ models failed security tests (Source: Veracode, 2025-07-30 · verified 2026-09-21), and AI-co-authored pull requests carried about 1.7 times the issues of human-only ones in a 470-pull-request sample (Source: CodeRabbit, 2025-12-17 · verified 2026-09-21).
Patterns declare the tools and stacks they are most associated with, so the team hubs and stack hubs aggregate them automatically.
Secrets and config
Keys, tokens and environment values stay on the server and out of the repository; production runs with production settings. Checklist items for this category.
- criticalAPI key shipped in the client bundle
A key meant for the server ends up in JavaScript the browser downloads, so anyone can read it and call the service as the app.
- criticalService-role key used from the front end
The database's bypass-everything key is used in client code, so row-level rules no longer protect anything.
- criticalSecret committed to the repository
A key or token is in git history, where it stays readable to anyone with repository access even after the file changes.
- highPrivate value under a public environment prefix
A variable named with the framework's public prefix is inlined into the client, even though its value should have stayed private.
- highDebug or test-mode configuration reaches production
Test-mode payment keys, verbose logging or seed data run in production because the configuration was copied from development.
- mediumSecurity headers absent on production responses
Responses ship without HSTS, content-type or frame policies, leaving the browser's built-in protections switched off.
Access control and data isolation
Every read and write is scoped to the user or tenant that owns the data, enforced where the data lives. Checklist items for this category.
- criticalRow-level security off on a new table
A table created by a migration or SQL has no row-level security, so the anonymous key can read and write every row through the public API.
- criticalPolicy that allows everything
Row-level security is enabled but the policy condition is true for everyone, so isolation exists in name only.
- criticalList endpoint returns other tenants' rows
A list or search endpoint filters by the wrong column or none, so a user sees records belonging to other accounts.
- criticalObject fetched by id without an ownership check
An endpoint checks that the caller is logged in, then returns whatever id was requested.
- criticalAdmin gate enforced only in the UI
The admin page hides its buttons from ordinary users, but the underlying route or action accepts calls from anyone logged in.
- criticalRole or flag read from the request
The server decides what a user may do from a role, plan or isAdmin value that arrived in the request body, query string or client state.
- criticalFirebase rules still in test mode
The database or storage rules allow any client to read and write because the permissive development rules were never replaced.
- highWhole records passed to the client
The server sends the full database row to the browser and the UI shows a few fields; the rest, including other people's data, is in the payload.
Auth and sessions
Identity is checked on the server for every protected route and mutation; login surfaces resist abuse. Checklist items for this category.
- criticalProtected route checked only in the browser
A redirect in client code hides the page from signed-out users while the data endpoint behind it answers anyone.
- criticalServer action without its own auth check
The page checks the session, but the exported action it calls does not, and actions can be invoked by direct POST.
- criticalRegistration or verification endpoint usable without prerequisites
An endpoint in the sign-up or verification flow accepts calls out of order, so an account can be created or verified without the intended step.
- highLogin and code entry without rate limits
Passwords and one-time codes can be guessed at machine speed because nothing counts attempts.
- highState-changing request accepted from another origin
A form or endpoint changes data on a cookie-authenticated request without checking where the request came from.
- highSession survives logout or password change
Other devices stay signed in after the user logs out or changes their password.
- highUser content rendered as markup
Text a user typed is inserted into the page as HTML, so a script in a name or comment runs in other users' browsers and can take their session.
Payments and entitlements
Money and plan state change only through verified events and server-side rules. Checklist items for this category.
- criticalWebhook accepted without a signature check
The endpoint that marks orders paid or plans active trusts any request that looks like an event.
- criticalPlan limits enforced only in the UI
The app hides premium features from free users while the API serves them to any caller.
- criticalPrice or amount taken from the request
The checkout call charges whatever amount the browser sent.
- highSame event processed twice
A delivered-twice event credits a customer twice or sends two emails.
- highHandler assumes events arrive in order
The code expects subscription.created before invoice.paid, and leaves the account in the wrong state when they arrive reversed.
LLM features
Model calls have spend limits, user content cannot steer tools, output is treated as untrusted, and changes are regression-tested. Checklist items for this category.
- criticalModel calls without a spend cap
Nothing limits how many tokens one user, or the whole app, can consume, so a loop or a hostile user runs up the provider bill.
- criticalInstructions in user content steer the model
Text inside a document, message or web page the model reads changes what the model does.
- criticalModel-triggered tools skip authorization
A tool the model can call reads or writes data with the app's credentials instead of the user's.
- highModel output rendered or executed as trusted
Text from the model is inserted as HTML, used as a URL, or run as a command without validation.
- highSecrets or private data in the system prompt
Keys, internal URLs or other users' records are placed in the prompt and can be extracted by asking.
- highModel or prompt changed without a regression run
A provider upgrade or prompt edit changes outputs across the product and nobody measures it before release.
- mediumModel call with no timeout or fallback
A slow or failing provider leaves the user on a spinner and may retry without bound.
Error handling and recovery
Failures are visible to the user and in logs, bounded in time, and free of internal detail. Checklist items for this category.
- highException caught and dropped
A catch block logs nothing and returns a default, so a failed write looks like success to the user and to the team.
- mediumLoading state that never resolves
When a request fails, the loading flag is never cleared and the screen spins forever.
- mediumStack trace or query text in the response
Error responses include internal paths, SQL or provider messages that help an attacker and confuse a user.
- mediumRetry loop without backoff or limit
A failing call is retried immediately and indefinitely, turning one outage into a flood.
- mediumOutbound call without a timeout
A hung third-party request holds the connection and the user until the platform kills it.
- mediumEmpty result treated as an error, or the reverse
An empty list shows an error screen, or a failed query shows 'no items yet', and in an agent workflow an empty result is treated as a bug to fix.
Performance smoke
Critical flows meet agreed budgets under baseline load; data access stays bounded. Checklist items for this category.
- mediumOne query per row
A list page runs a separate query for each item, so response time grows with the data.
- mediumList endpoint without a page size
An endpoint returns every row in the table, which works in development and fails at the first real customer.
- mediumGenerated migration without indexes
A new foreign key or filter column ships without an index, and queries slow down as the table grows.
Data integrity and migrations
Schema changes are reversible, destructive steps are gated, environments are separate. Checklist items for this category.
- criticalDestructive change without a verified backup
A drop, truncate or rewrite runs against production without a restore having been tested.
- criticalDevelopment and production share a database
Local runs, previews or agent sessions point at the production connection string.
- highMigration with no down path
The schema change cannot be undone, so a rollback of the release means restoring from backup.
- highCascade delete removes more than intended
Deleting a parent record silently removes children the product meant to keep.
- highRace on balance or inventory writes
Two simultaneous requests both read the old value and both succeed, so a balance goes negative or an item sells twice.
Deploy and rollback
Production changes come from one reviewed path and can be undone within a known time. Checklist items for this category.
- criticalCoding agent holds production credentials
An agent session can run commands against production data or infrastructure without a human approval step.
- highProduction deploy from a local push
Anyone with the CLI or a hosting token can deploy to production without review.
- highRollback never rehearsed
The team believes it can roll back but has not done it, and finds out the migration or the cache makes it slow or impossible.
- mediumStaging and production configured differently
A flag or variable exists in one environment and not the other, so a release passes in staging and fails in production.
Mobile release gates
Purchases, permissions, OS versions and over-the-air updates are verified before a store or OTA release. Checklist items for this category.
- criticalIn-app purchase untested in the store sandbox
The purchase code was only run against a mock, so restore, failed payment and receipt validation break on real devices.
- highPermission denial crashes or blanks the screen
The app assumes camera, location or notification permission was granted, and a denial leaves a blank screen or a crash.
- highOnly the latest OS version tested
The release runs on the developer's device and fails on the minimum supported OS version.
- highOver-the-air update skips the release gate
JavaScript changes go to every installed device through an OTA channel without the checks a store release gets.
- highSubscription renewal and lapse untested
Renewal, grace period, cancellation and refund leave the account in the wrong state because only the first purchase was ever exercised.
Questions
Does AI generated code have more bugs?
What breaks in AI written code?
Vibe coding security risks
Get a risk list for your codebase
The coverage audit maps these patterns to your critical flows in 5 business days, for $1,200 credited to a first month.