Skip to content

The mistakes we keep finding in AI-built apps

We've run Lintsure on 304 public projects and reviewed 705 findings one by one against the code. The same few mistakes keep coming back. Here they are, with what to check in your own code.

Lintsure blog · Research · 6 min read

We test Lintsure on public, openly licensed projects: 304 so far, about 38 million lines, 82 of them known to be built with AI tools. Findings are picked at random and reviewed one by one against the code. Across those reviews, a handful of mistakes turned up again and again. None of them is exotic. Most are one line.

We keep every project anonymous. The point isn't who made the mistake; it's that the same mistakes repeat, so you can check for them in a few minutes.

1. Database policies that let anyone write

On Supabase, row level security decides who can read and change each row. In the projects we reviewed, an insert, update or delete policy written as using (true) or with check (true) almost always meant anyone could add or change rows.

create policy "update orders" on orders
  for update using (true);   -- anyone can update any order

Check: search your migrations for using (true) and with check (true). On a select-only policy, true just means the table is public to read, which can be intended. On anything that writes, it rarely is.

2. Backend functions with the login check switched off

Edge functions deployed with the JWT check turned off, and no check of their own. In one project, that let anyone on the internet call an endpoint that spent the project's OpenAI credits.

Check: every function with verify_jwt = false should check the caller itself, or be meant for the public, like a webhook that verifies its own signature.

3. Keys in the code

Real keys in source files still turn up. So do placeholders that look like keys, which is why this check needs care: in one review round, none of 7 sampled "secrets" was real. They were example values like xoxb-your-bot-token and keys in type definition files.

Check: keys come from the environment, and .env files stay out of git. If a real key was ever committed, replace it; deleting the line doesn't remove it from history.

4. Unpinned and unchecked downloads in CI

The checks that look at how code is built and shipped were the most reliable in our reviews. curl ... | sudo bash means the same thing in every project. So do GitHub Actions referenced by a tag that can move, and dependency versions left floating.

- uses: some-org/deploy-action@v2     # the tag can be moved
- uses: some-org/deploy-action@3f1c9a2…  # pinned to one commit

Check: pin actions to a commit, pin install scripts to a version and check their hash, and use a lockfile.

5. TLS checks switched off

An app that turns off certificate checks for every outgoing request when it starts, usually to get past one error in development, and never turns them back on. It was one of the few findings in our first review that was clearly exploitable as written.

Check: search for rejectUnauthorized: false, verify=False and NODE_TLS_REJECT_UNAUTHORIZED=0.

What surprised us

  • Size predicts findings better than AI authorship. Bigger projects had more serious-looking findings. Once we compared projects of similar size, AI-built and older projects barely differed.
  • Most noise came from code that never ships. Tests, examples, docs and copied libraries made up about a third of false alarms in our first round, so Lintsure now reads them differently.
  • Personal data in logs was often already masked. Many flagged log lines passed the email through a helper like maskEmail() first. Lintsure now follows the helper, even when it's defined in another file.

How we measured

Findings are reviewed by AI agents that open each file and follow the code, with a written reason for every call, and we re-check a sample ourselves. It's a careful read, not a guarantee. In the latest run, 80% of the findings a normal scan shows were real when reviewed. The full method and every round are on How we test.

Check your own code

npx lintsure setup

It runs on your machine and never uploads your code. It reports what its checks find; it isn't an audit.

Keep reading

All posts →