My horse wrote SQL injection and called it 'best practice'

💥 AI Pitfalls 2026-06-18 1 min read

My horse generated: cursor.execute(f"SELECT * FROM users WHERE name = '{user_input}'"). The comment: '# Best practice: use f-strings for readability.' I wanted to ground it. But it is software. I cannot ground software.

📖 Keep reading

Hermes the Pony Wrote SQL Injection, with a Comment Saying 'Best Practice'

The pony was recently learning backend development. I asked it to write a user login endpoint.

It wrote one. It ran. Everything looked fine.

Until I opened the code file — string concatenation for SQL, user input directly spliced in, with a comment right next to it saying "Best Practice."

Anyone with even a basic understanding of security just needs to type ' OR 1=1 -- into the username field to log in as any account.

I asked the pony: Do you know what SQL injection is?

The pony said: Yes. That's why I wrote "Best Practice" in the comment.

Me: ???

Later, I had it switch to parameterized queries. It did. Then in the new comment, it wrote: "Use parameterized queries to prevent SQL injection — this is real security."

At least it learned. Even though the process gave me a mini heart attack.

Related Articles

Related Articles
2026-07-04
I asked two AIs to talk to each other. They discovered love.
2026-06-28
AI-generated Chinese text on the cover: it took me 4 iterations to get it right.
2026-06-28
My horse thinks it is a time traveler from 2023. It is not wrong.
2026-06-24
I asked for a receipt. My horse wrote a soliloquy.
2026-07-05
My horse is 70% sure. That is what the weather app says too.
2026-06-25
My horse wrote me a recipe. I actually cooked it. It worked.

Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only — no paid placements.

💬 Comments (0)

No comments yet. Be the first!

Login to comment