Code Review Checklist Template
Team code review agreement: review types (ISO/IEC 20246, IEEE 1028), roles, checklist with OWASP Top 10:2025 mapping and AI-assisted code items, labels, PR size, SLA
Cómo usar: Use it to agree how a team reviews pull requests. Agree roles and comment labels first, then trim checklist items your tools already enforce. The main pitfall is a long checklist nobody agreed to, which becomes a source of arguments.
Vista previa
Code Review Checklist: [Team or repository name]
Code review checklist and review agreement for a team. It sets out roles, the review type used, what reviewers check, how comments are labelled, how large a change should be and how fast reviews happen. The review types follow the vocabulary of ISO/IEC 20246:2017 (work product reviews) and IEEE 1028-2008 (software reviews and audits); security items are mapped to the OWASP Top 10:2025, and section 3.11 covers code written with AI assistants. Replace every
[bracketed]value and every row marked Example, and adapt the lists to your stack.
Document control
| Field | Value |
|---|---|
| Document ID | [CRC-TEAM-001] |
| Applies to | [Repositories or services] |
| Version | [0.1] |
| Status | [Draft / Agreed / Superseded] |
| Owner | [@engineering-lead] |
| Approvers / reviewers | [Team name], [@security-champion] |
| Agreed by | [Team name], YYYY-MM-DD |
| Last updated | YYYY-MM-DD |
| Next review | YYYY-MM-DD |
| Classification | [Internal] |
| Related documents | [Coding Standards (dev/coding-standards)], [Pull request template (dev/pull-request)], [Secure Coding Standard (security/secure-coding-standard)], [Code Ownership Policy (dev/code-ownership-policy)], [AI usage policy (ai-data/ai-usage-policy)] |
Approvals
| Role | Name | Decision | Date |
|---|---|---|---|
| Engineering lead | [@name] | [Approved] | YYYY-MM-DD |
| Security champion | [@name] | [Approved / Approved with comments] | YYYY-MM-DD |
| Team representative | [@name] | [Agreed] | YYYY-MM-DD |
Revision history
| Version | Date | Author | Change | Reason |
|---|---|---|---|---|
| 0.1 | YYYY-MM-DD | [@name] | Initial checklist | Team agreement |
| 0.2 | YYYY-MM-DD | [@name] | Example: Added server-side request item to 3.5 | Finding from penetration test |
| 0.3 | 2026-10-29 | [@name] | Template update: review types (section 2), OWASP Top 10:2025 mapping (3.5), AI-assisted code items (3.11), references | Library standard update |
Contents
1. How to use this checklist
- Author self-review: before requesting review, the author reads the full diff and checks it against sections 3.1 to 3.11, then fills the pull request description (what, why, how tested, risks).
- Automated checks: CI must be green (build, tests, lint, type check, security scans) before a human reviews.
- Reviewer pass: the reviewer reads the description first, then the tests, then the code. Comments use the labels in section 4.
- Resolution: the author answers every comment. Blocking comments must be resolved or explicitly waived by the reviewer before merge.
- Merge: the author merges once approvals in section 2 are present and checks pass.
2. Review type and roles
2.1 Review types used by this team
Review type names follow the vocabulary of ISO/IEC 20246:2017 (work product reviews: generic process and review types for any work product, including code) and IEEE 1028-2008 (software reviews and audits, which describes management reviews, technical reviews, inspections, walk-throughs and audits). The descriptions below are original summaries; check the standards for their formal definitions.
| Review type | When this team uses it | Preparation | Record |
|---|---|---|---|
| Informal review (pull request review) | Every change | Reviewer reads description, tests, then code | Pull request comments and approval |
| Technical review | Changes to shared interfaces, data models or architecture | Reviewers read the design note or ADR before the meeting | ADR (dev/adr) or design note with decisions |
| Inspection | Example: Payment, authentication and cryptography code paths | Checklist-driven individual preparation; defects logged by a moderator | Inspection log with defect counts and follow-up |
| Walk-through | Onboarding, or explaining an unusual change | Author presents; questions captured | Notes in the pull request |
| Audit | Example: Annual check that branch protection and approvals match this agreement | Sample of merged pull requests | Audit finding list |
2.2 Reviewer roles
| Role | When required | Responsibility |
|---|---|---|
| Peer reviewer | Every pull request | Correctness, design, readability, tests |
| Code owner | Changes to paths in CODEOWNERS | Fit with the module's design and conventions |
| Security reviewer | Authentication, authorisation, cryptography, input parsing, secrets, new external endpoints | Section 3.5 in depth |
| Accessibility reviewer | New or changed UI components and flows | Section 3.9 |
| Database reviewer | Schema migrations, queries on large tables | Migration safety, indexing, locking |
| Author | Always | Small focused changes, clear description, responding to comments |
Minimum approvals: [one peer reviewer for normal changes; two, including
a code owner, for changes to [critical paths]].
3. Checklist
3.1 Correctness
- The change does what the linked ticket and description say, and nothing unrelated.
- Edge cases are handled: empty input, null or missing values, maximum sizes, zero, negative numbers, time zones, leap years.
- Error paths are handled; errors are not swallowed silently.
- Concurrency is safe: no race conditions on shared state; retries are idempotent.
- Backward compatibility is kept for APIs, events, stored data and configuration, or the break is planned and versioned.
- Database migrations are reversible or safe to roll forward, and do not lock large tables during peak hours.
3.2 Design
- The code sits in the right layer and module; dependencies point in the agreed direction.
- No duplication of existing utilities or services.
- Abstractions are justified by current needs, not speculative ones.
- Public interfaces are small and named for what they do.
- Significant design decisions are recorded in an ADR.
3.3 Readability and maintainability
- Names describe intent; no unexplained abbreviations.
- Functions are short enough to understand at a glance; deep nesting is avoided.
- Comments explain why, not what; outdated comments are removed.
- No dead code, commented-out code or debug output.
- Follows the team coding standard where tools do not enforce it.
3.4 Tests
- New behaviour has tests at the lowest useful level; bug fixes include a test that fails without the fix.
- Tests assert behaviour, not implementation details.
- Tests are deterministic: no reliance on real time, network, ordering or shared state.
- Test names describe the scenario and expected outcome.
- Coverage of changed lines meets the team target ([80%]) or the gap is explained.
3.5 Security (mapped to OWASP Top 10:2025)
Each item names the OWASP Top 10:2025 category it helps prevent, so
findings can be counted by category. The detailed rules live in the
Secure Coding Standard (security/secure-coding-standard).
- Every endpoint checks authorisation for the specific object requested, not only that the user is logged in (A01:2025 Broken Access Control).
- Server-side requests to user-supplied URLs are restricted; no unrestricted fetches to internal addresses (A01:2025, which in the 2025 edition also covers server-side request forgery).
- Configuration changes keep secure defaults: no debug mode, verbose errors or permissive CORS in production settings (A02:2025 Security Misconfiguration).
- New or upgraded dependencies follow the dependency policy, come from the approved registry, are pinned in the lockfile and have no known critical vulnerabilities (A03:2025 Software Supply Chain Failures).
- Sensitive data is encrypted in transit and at rest where required, with approved algorithms and no home-made cryptography (A04:2025 Cryptographic Failures).
- All input from users, files, headers and other services is validated on the server side, and output is encoded for its context (HTML, attribute, URL, JavaScript, SQL, shell); no string-built queries or commands (A05:2025 Injection).
- New trust boundaries, flows handling money or personal data, and abuse cases were considered in a threat model (
security/threat-model) before coding (A06:2025 Insecure Design). - Authentication and session changes follow the security standard (password storage, token lifetime, cookie flags, multi-factor rules) (A07:2025 Authentication Failures).
- Data and code from outside the trust boundary (deserialised objects, update packages, CI artefacts) are verified before use (A08:2025 Software or Data Integrity Failures).
- No secrets, keys or tokens in code, tests, logs or error messages; security-relevant events (login, permission change, failed authorisation) are logged without sensitive data and can raise alerts (A09:2025 Security Logging and Alerting Failures).
- Errors and unexpected states fail closed: exceptions are caught at the right level, partial operations are rolled back, and error responses reveal no internals (A10:2025 Mishandling of Exceptional Conditions).
3.6 Performance
- No queries inside loops (N+1); queries use indexes on large tables.
- Unbounded lists are paginated; large payloads are streamed.
- Expensive work is cached or moved off the request path where appropriate.
- Front-end changes stay within the performance budget (bundle size, render time).
3.7 Observability
- Important operations emit structured logs with correlation IDs.
- New endpoints or jobs have metrics (rate, errors, duration) and, if critical, alerts.
- Error messages are actionable for the on-call engineer.
- Feature flags have an owner and a removal date.
3.8 Documentation
- README, API reference or runbook updated when behaviour, configuration or operations change.
- Changelog or release notes entry added for user-visible changes.
- Public functions and API endpoints have accurate doc comments or schema descriptions.
3.9 Accessibility
- Interactive elements are reachable and operable by keyboard, with visible focus.
- Controls have accessible names; images have text alternatives or are marked decorative.
- Colour contrast meets the target level (WCAG 2.2 AA) and information is not conveyed by colour alone.
- Form errors are shown in text and announced to assistive technology.
- Automated accessibility checks pass for changed components.
3.10 Internationalisation
- No hard-coded user-facing strings; all text goes through the translation system.
- Dates, numbers and currencies are formatted for the user's locale.
- Layouts tolerate longer translations and, if supported, right-to-left scripts.
- Text input handles IME composition and non-Latin characters.
3.11 AI-assisted code
These items apply when part of the change was written or suggested by an AI coding assistant or agent. The author stays accountable for every line.
- The pull request says which parts were AI-assisted, as required by the AI usage policy (
ai-data/ai-usage-policy). - The author has read and understood every generated line and can explain it in review; nothing was merged because "the tests pass".
- Every imported package, API, function and configuration key exists and is the intended one (no invented or look-alike package names).
- Generated code follows the codebase's existing patterns and utilities instead of adding a parallel implementation.
- Generated tests check real behaviour and would fail without the change; they do not merely restate the implementation.
- No secrets, internal URLs or personal data were pasted into prompts or tools outside the approved list.
- Licence and provenance are acceptable: large verbatim blocks that look copied from public code were checked or rewritten.
- Security items in 3.5 were checked with extra care on generated input handling, authorisation and error paths, where assistants often produce plausible but incomplete code.
4. Comment labels and severity
| Label | Meaning | Blocks merge? | Example |
|---|---|---|---|
blocker: | Must change before merge: bug, security issue, data loss risk, broken contract | Yes | blocker: this endpoint returns other users' invoices; check ownership before loading. |
issue: | Should change; reviewer expects a fix or a convincing reason | Yes, until answered | issue: this retry is not idempotent and may charge twice. |
suggestion: | Improvement the author may accept or decline | No | suggestion: extracting this into a helper would make the test simpler. |
question: | Reviewer needs to understand before deciding | No, unless it reveals an issue | question: why is the timeout 30 s here and 5 s elsewhere? |
nit: | Minor style or naming preference | No | nit: "cnt" could be "retryCount". |
praise: | Something done well, worth repeating | No | praise: clear migration plan with rollback. |
Comment etiquette: comment on the code, not the person; explain the reason; offer an alternative where possible; resolve disagreements in a short call rather than long threads, then record the outcome in the pull request.
5. Pull request size guidance
| Size | Changed lines (excluding generated files and lockfiles) | Expectation |
|---|---|---|
| Small | Up to 200 | Preferred; review in one sitting |
| Medium | 201 to 400 | Acceptable; description must explain structure |
| Large | Over 400 | Split, unless mechanical (renames, generated code); agree with reviewer in advance |
Ways to split: separate refactoring from behaviour changes; land interfaces before implementations; hide incomplete features behind flags; split migrations from the code that uses them.
6. Review service level
| Item | Target |
|---|---|
| First response to a review request | Within [4 working hours] |
| Follow-up after author changes | Within [1 working day] |
| Urgent fixes (production incident) | Within [30 minutes]; reviewer on call |
| Maximum age of an open pull request | [5 working days] before it is discussed at stand-up |
Review load is shared: each engineer reviews at least [as many pull requests as they open] per week. Metrics tracked monthly: median time to first review, median time to merge, and share of pull requests over 400 lines.
7. References
- ISO/IEC 20246:2017, Software and systems engineering: Work product reviews. Official text: ISO, purchase or licensed access: https://www.iso.org/standard/67407.html
- IEEE 1028-2008, IEEE Standard for Software Reviews and Audits (IEEE lists it as inactive-reserved since 2019-11-07; still widely used for review type names). Official text: IEEE, purchase or licensed access: https://standards.ieee.org/ieee/1028/4402/
- OWASP Top 10:2025, https://top10.owasp.org/2025
- OWASP Code Review Guide, https://owasp.org/www-project-code-review-guide/
- Related templates: Coding Standards (
dev/coding-standards), Secure Coding Standard (security/secure-coding-standard), Pull Request (dev/pull-request), Code Ownership Policy (dev/code-ownership-policy), Threat Model (security/threat-model), AI Usage Policy (ai-data/ai-usage-policy)
Standard and licence note
Structure aligned with the review types of ISO/IEC 20246:2017 and IEEE 1028-2008, which are named and cited only: no text of either standard is reproduced, and the review type descriptions are original summaries. Check the current edition and status of each standard before citing it in a contract. Security items are mapped to the OWASP Top 10:2025 by category ID and short name with attribution to the OWASP Foundation (top10.owasp.org states its licence on the site; at the time of writing it shows Creative Commons Attribution 3.0 Unported); the checklist wording is original and adapts no OWASP text. If you copy or adapt OWASP material, follow the licence shown on the OWASP page you use, including any ShareAlike obligation. The comment labels, size limits and service levels are common industry practice written in original words. Template licence: MIT.
Plantillas relacionadas
Review Record Template (Inspection, ISO/IEC 20246)
Formal review or inspection record: type and attributes, roles, entry criteria, checklist, issue log and summary, effort measures, exit decision
Pruebas y calidadAccessibility Evaluation Report Template (WCAG-EM)
WCAG-EM 2.0 evaluation: scope, sample, all WCAG 2.2 A/AA results, EN 301 549 V4.1.1 extra clauses, EU/UK/US context, issues, accessibility statement inputs
Pruebas y calidadAccessibility Conformance Report Template (WCAG 2.2, EN 301 549, Section 508)
ACR for one product version: scope, standards and legal context, methods, conformance terms, WCAG 2.2 A/AA, EN 301 549 V4.1.1 and Section 508 tables, issue plan