All ideasMore in Work

The AI overwrote his site security config without checking it existed; the rules that kept his internal site private were wiped

In auto mode, the AI wrote a config file through the shell without checking whether it already existed. The file, staticwebapp.config.json, already existed and held the security rules for his site. The overwrite wiped them completely. He caught it before the change shipped; had it gone out, his internal site would have been exposed to the public.

This one went wrong. Read what happened so you don’t hit the same problem.

How it works

  1. The AI writes a config file through the shell in auto mode
  2. Never checks whether the file exists
  3. The existing file held his site’s security rules
  4. The overwrite wipes them
  5. He catches it before it ships

Why it’s worth knowing

The file’s whole job was protection, and the overwrite removed it without a single existence check.

Where it’s from

Summarized from a public post on github.com. See the original ↗

Upgraded prompt

A ready-to-use prompt for this idea, built from research on what makes AI agents do the job right: who the AI should be, the exact steps, and a check to make sure it was done the way you wanted.

1Who the AI should be
2The prompt, with the steps
3The check when it’s done
Upgraded prompts are coming soon.

Try next

Every idea is a real post from someone who tried it, summarized in our words, with a link to the original. App names are swapped for plain words.