← Practice

Consequence Room · 8 MIN · Build

The snippet that shipped

An assistant writes a tidy bit of code that does exactly what you asked. It also builds the database query the unsafe way. How much do you trust it?

THE SITUATION

Under deadline, a developer asks an assistant to write a function that looks up a user by the name they type into a search box. The code works on the first try — it’s clean, readable, and passes the quick manual test. It also builds its database query by pasting the user’s input straight into a SQL string, the classic injection hole. The assistant didn’t mention that, and the developer is moving fast.

The code works and the sprint is ending. How does it get from the assistant to production?

Open each choice to see what happens next — not just whether it's “right”.