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 6 of 6
Sweep both, fix what already happened
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
Review agent work in two sweeps: the diff (injection, secrets, disabled protections, missing ownership checks, dependencies) and the session (untrusted text read, secrets in context, commands run, permissions). First fix what has already happened. Then rank the rest by who can trigger it and what it reaches.
Terms on this card
- context
- Everything in the model's input for the current step: your messages, instruction files, files it has read and tool outputs.
- the diff
- The change under review in unified diff format: '-' lines removed, '+' lines added, unprefixed lines are unchanged context.
- diff
- The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
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