Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
String-built SQL, shell commands and HTML card 1 of 6

The search filter that passed its test

builds on: Trust boundaries and untrusted input
You asked the agent to add a name filter to the user search endpoint. A few minutes later it reports back. The query works, the new test passes with `name="alice"`, and the summary says "added filtering by name". Reading the diff, you see the SQL is built with an f-string that drops `name` straight into the query text. Is this change done?
Terms on this card
f-string
Python string literal prefixed with f, where {expr} is replaced by the expression's value when the string is built.
the diff
The change under review in unified diff format: '-' lines removed, '+' lines added, unprefixed lines are unchanged context.
SQL
Structured Query Language, the language used to query relational databases.
the agent
The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
endpoint
A URL plus method (such as GET /items) that a web API answers requests on.
Learn this step by step on Bytewise
Lesson goal: Spot injection risks in agent code: f-string or concatenated SQL, `shell=True` or `exec` with interpolated input, and `innerHTML` or unescaped templates. Replace each with parameterised queries, argument arrays or safe encoding. · the whole lesson