An AI-built farm management app
What it was built with
One HTML file. Markup, styling and all the logic in a single page, with an online database plugged in and deployed by dragging the file onto a free host.
What I found
The database address and key were written into the file, so every copy of the app pointed at the same database and anyone who viewed the page source had the key. The database was set to let that key read, change and delete everything, including another farm’s records. Admin access was a PIN checked on the user’s own device, which anyone can get around. The whole farm was saved as one lump, so two people saving at once meant one person’s entries disappeared. In eight of the thirteen places meant to catch errors, nothing happened, so a failed save looked like a successful one. No tests, and nothing checked the numbers staff typed in.
What it would have cost
Anyone with the file could have read or wiped the farm’s records. Staff would have lost mortality counts and feed logs without knowing. And because nobody knew who owned the database account, the leaked key could never be revoked.
What fixing it involved
The verdict was rebuild, not patch. The prototype became the reference for a new build: each farm’s data walled off from every other farm’s, and tested to prove it; every change going through a server that checks who’s allowed; a permanent record of every entry so nothing is silently overwritten; and a tool to bring the old data across.