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 3 of 6
Two sweeps, then rank
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
**Diff sweep:** string-built SQL/shell/HTML · secrets in code, logs, fixtures · protections switched off · endpoints without ownership checks · new dependencies and lockfile changes.
**Session sweep:** untrusted text it read (issues, web pages, READMEs) · secrets that entered context · commands it ran or installed · permissions it held.
**Rank:** already happened? Act first (rotate, inspect). Then *who can trigger it × what it reaches*. Gaps that only widen future damage come last.
Terms on this card
- lockfile
- A generated file recording the exact versions of every direct and transitive dependency installed.
- rotate
- Replace a secret with a new one and revoke the old one, so the exposed value stops working.
- context
- Everything in the model's input for the current step: your messages, instruction files, files it has read and tool outputs.
- SQL
- Structured Query Language, the language used to query relational databases.
- future
- In Rust, a value representing async work. It is lazy: nothing happens until something polls it.
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