ATALAIA
  1. Home
  2. Services
  3. Secure Code Review
05Station 05 · Build

Secure Code Review

Every pull request gets the same review, whatever it touches. We define with you which diffs need a security reviewer, what they check, and who that reviewer is.

The review rule, written into the repo

What leaves the Consulting step is not a PDF. It is a pull request to your own repo that makes the rule real.

.github/CODEOWNERSPR #412 · security review rules
1# Default: one approval from the team
2* @team/devs
3+# Risky paths: a security reviewer must approve
4+/src/auth/** @team/security-reviewers
5+/src/rewards/redeem.ts @team/security-reviewers
6+/src/ledger/** @team/security-reviewers
7+/src/partners/callback/** @team/security-reviewers
ATALAIAReview rule

These paths cannot merge without a security reviewer. The money-paths checklist is linked in the PR template, and the SLA is 48 hours.

CHAMPION

Approved. Branch protection now requires code-owner review, and the rota is in the team calendar.

8/infra/** @team/platform

Writing the review rule

Pick a step, or let it play. The Atalaia consultant takes the room from context to results; each step leaves something behind.

Step 1Context

Dev leads walk us through the codebase, the review habits and the code that moves money or checks identity.

CONSULTANTWhich code moves points or decides who you are?

DEV LEADredeem(), the ledger client and the partner callback parser. And auth, obviously.

DEVELOPERBut every PR gets the same review. One approval, from whoever is free.

Leaves the roomRisky paths: auth, redeem, ledger, partner parser

Step 2Audit

We read past merged PRs and review rules to see which risky changes went through without a security look.

CONSULTANTI went through your last forty merged PRs. Nine touched those paths.

DEVELOPER 2And how many had a security look?

CONSULTANTTwo. Both because someone happened to be curious. That is Ad hoc.

Leaves the roomLast 40 PRs: 9 risky, 2 reviewed

Step 3Consulting

Risky paths, checklists, PR rules and a champions rota, with named reviewers and a roadmap.

CONSULTANTRisky paths go into CODEOWNERS. A security reviewer approves, or there is no merge.

CHAMPIONI will be the reviewer for payments. I already know that code.

CONSULTANTThen you own the money-paths checklist. Eight checks, kept in the repo.

DEV LEADAnd I own the rota, so it is not always the same two people.

Leaves the roomCODEOWNERS, 3 checklists, a champions rota

Step 4KPIs

Coverage of risky PRs, review time against the SLA and issues caught in review, tracked every sprint.

CONSULTANTFirst number: how many risky PRs got a security approval. The target is all of them.

DEVELOPERAnd if nobody reviews for three days, I am stuck.

DEV LEAD48-hour SLA, then it escalates to me. I report both every sprint.

Leaves the roomKPIs: coverage, review time, caught in review

Step 5Results

Rules live in the repo, champions run the reviews, and the dev lead reports the KPIs each sprint.

CONSULTANTYou keep the path list, three checklists, the PR rules and a six-month roadmap.

CHAMPIONNext quarter I train two more champions on the same checklists.

DEVELOPER 2So it runs without you.

CONSULTANTThat is the point. I am back in three months to check the numbers.

Leaves the roomRules in the repo, rota running, sprint report

  • Atalaia
  • CONSULTANT
  • Company A
  • DEV LEAD
  • DEVELOPER
  • DEVELOPER 2
  • CHAMPION

Before and after

Before

Without rules, risky changes to auth or payments get the same quick approval as a typo fix. Logic flaws no scanner sees reach production unread.

  • Every pull request gets the same review, whatever it touches
  • Nobody can list the code that moves money or checks identity
  • Security reviews depend on who happens to be free
After
  • A list of risky paths that always need a security reviewer
  • Review checklists per type of path
  • PR rules and review SLAs, enforced through code owners
  • A champions rota, KPIs and a roadmap

Typical shape: Two to four weeks: a mapping session, a review of past PRs, two design sessions and a handover.

Where you are, where you go

The audit places you on Atalaia's four-level scale. The roadmap says how you climb it, and the KPIs show you did.

  1. Level 0Unwatched

    No security review. Every PR gets one approval from whoever is free.

  2. Level 1Ad hoc

    Risky changes get a security look when someone remembers, or happens to be curious.

  3. Level 2Owned

    Risky paths in CODEOWNERS, checklists in the repo, named reviewers and an agreed SLA.

  4. Level 3Measured

    Coverage and review time reported each sprint; checklists updated from what reviews actually catch.

What we measure

Risky PR coverage

Share of PRs touching risky paths that got a security approval. Owned by the dev lead.

Review time

Hours from review request to security approval, against the 48-hour SLA. Owned by the dev lead.

Caught in review

Security issues found in review before merge, per sprint. Owned by the champions.

Active reviewers

People who did at least one security review this month. Owned by the champions.

Hands-onWant us to read the risky diffs ourselves for a while? That is a separate hands-on engagement, scoped after this one.

Hands-on work →

Want the service with a product behind it? The Atalaia platform, in development, will help watch this part of the line. It does not replace the service: like any tool, it only works once the team and the owners are in place.

See the platform →