Reviewing, testing and securing AI code
Reviewing AI-written code for logic, hallucinated dependencies, security, tests, maintainability and licensing.
11 skills · 4 stages each
Skills
- Reviewing AI-written codeFor engineersStart hereReading agent and assistant diffs for logic, design and scope creep before they reach mainneeds: Code review in human-agent teams110 questions
- Hallucinated APIs and packagesFor engineersCatching invented functions, made-up package names and outdated APIs in AI code before they are installed or shippedneeds: Reviewing AI-written code110 questions
- Security flaws in generated codeFor engineersThe vulnerability classes AI assistants write most often: injection, missing authorization, leaked secrets, trusted input and unsafe defaultsneeds: Reviewing AI-written code110 questions
- Judging AI-written testsFor engineersTelling real tests from ones that pass for the wrong reason, with mutation thinking, honest mocks and tests agents cannot quietly weakenneeds: Reviewing AI-written code110 questions
- Linters, types and SAST as guardrailsFor engineersRunning linters, type checkers, SAST, dependency and secret scanners on every agent change, and stopping agents from switching them offneeds: Reviewing AI-written code110 questions
- Maintainability of AI-written codeFor engineersKeeping AI-written code easy to change: duplication, dead code, over-engineering, codebase consistency and safe cleanupneeds: Reviewing AI-written code110 questions
- Licensing and provenanceFor engineersOpen-source licences, where generated code came from, attribution, licence scanning and company policy for AI coding toolsneeds: Reviewing AI-written code110 questions
- Performance review of AI-written codeFor engineersCatching N+1 queries, hidden quadratic loops, memory growth and chatty I/O in AI code, and proving fixes by measuringneeds: Reviewing AI-written code110 questions
- Checking a coding agent's claims of doneFor engineersAgents report success the evidence does not support; matching claims to the run log, rerunning checks and catching code that games themneeds: Reviewing AI-written code110 questions
- Error handling and failure paths in AI codeFor engineersAI code favours the happy path: swallowed errors, silent fallbacks, missing timeouts, unsafe retries, races and forgotten edge inputsneeds: Reviewing AI-written code110 questions
- Reviewing AI changes to migrations, infra and CIFor engineersAgent-written database migrations, infrastructure-as-code, Dockerfiles and CI workflows, where one bad line deletes data or leaks secretsneeds: Reviewing AI-written code110 questions
Scenarios using this domain
Where to study
- Making retries safe with idempotent APIs (Amazon Builders' Library) (opens in a new tab)ArticleFree
How idempotency tokens let a client retry a request without doing the work twice.
- Timeouts, retries and backoff with jitter (AWS Builders' Library) (opens in a new tab)ArticleFree
Why every remote call needs a timeout and how capped backoff with jitter avoids retry storms.
- Error Handling Cheat Sheet (OWASP) (opens in a new tab)DocsFree
Handle errors centrally, fail safely and log enough detail without leaking it to users.
- Transaction Isolation (PostgreSQL documentation) (opens in a new tab)DocsFree
What concurrent transactions can see, and which anomalies each isolation level allows.
- Idempotent requests (Stripe API reference) (opens in a new tab)DocsFree
A working example of an idempotency key header on a payment API.
- CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition (opens in a new tab)StandardFree
The standard definition of check-then-act races, with examples and mitigations.
- contextlib: utilities for with-statement contexts (Python docs) (opens in a new tab)DocsFree
Context managers and ExitStack for guaranteed cleanup, even when a step fails.
- ESLint documentation (opens in a new tab)DocsFree
Rule configuration, severity levels and inline disable comments.
- TSConfig reference (opens in a new tab)DocsFree
Every compiler option, including the strict family that agents often loosen.
- Semgrep documentation (opens in a new tab)DocsFree
How rules match code patterns, how to triage findings and how to write custom rules.
- CodeQL documentation (opens in a new tab)DocsFree
How CodeQL queries a code database for data-flow bugs such as injection.
- OSV-Scanner (opens in a new tab)ToolFree
A free scanner that matches lockfiles against the OSV vulnerability database.