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.
Review agent work for security and supply-chain risk card 5 of 6

Four findings in one diff, ranked

builds on: String-built SQL, shell commands and HTML, Secrets in code, logs and commits, Security checks switched off to make it work, Endpoints that authenticate but don't authorize, Vetting a dependency the agent added, Limiting what the agent can break
**1** f-string SQL: `n` comes from the URL, so any logged-in user can pull rows from any table into the PDF, and with some database drivers change data too. **2** No owner check: any user can fetch any invoice by counting ids. **3** `pdfgen-fast`: unpinned and unvetted, and its install already ran in the session. If it turns out malicious, it jumps to first. **4** `verify=False`: only someone on the network path can swap the logo. Fixes: parameterise, filter by owner, vet and pin, restore verification.
// Python
+++ b/requirements.txt
+pdfgen-fast
+++ b/api/invoices.py
+import pdfgen_fast
+@app.get("/invoices/<n>/pdf")
+@login_required
+def invoice_pdf(n):
+    sql = f"SELECT * FROM inv WHERE id={n}"
+    row = db.execute(sql).fetchone()
+    logo = requests.get(row["logo_url"],
+                        verify=False)
+    return pdfgen_fast.render(row,
+                              logo.content)
Terms on this card
f-string
Python string literal prefixed with f that inserts variable values directly into the text, e.g. f"id={n}".
parameterise
Pass values to a SQL query separately from the query text, so the database never treats them as SQL code.
owner check
A check that the logged-in caller may access this specific record, not just that they are logged in.
unpinned
A dependency listed without an exact version, so any future release, including a compromised one, can be installed.
verify=False
Argument to Python's requests library that turns off TLS certificate checking for that request.
Learn this step by step on Bytewise
Lesson goal: Check an agent change and session for injection, leaked secrets, disabled protections, missing authorization, risky new dependencies, prompt-injection exposure and excessive permissions. Rank the findings by impact. · the whole lesson