Practice 06 — Source Code Review

Your tests prove the code works. Not that it cannot be used against you.

Automated analysis finds the bugs that are easy to describe. The expensive ones are decisions: a check placed one layer too late, an identifier trusted because it arrived signed last week, a branch nobody ever wrote an input for. Those are found by reading the code.

  • OWASP ASVS
  • OWASP Code Review Guide
  • CWE Top 25
What sets the estimate
  • Repositories
  • Languages and frameworks
  • Entry points
  • Authorisation model
  • Review window

Scoped on the call, quoted in days, in writing.

Scope a source code review

A short call to understand what the code does and which parts would hurt most, and to explain how we would read it.

Times in

Loading available times…

Why teams call

You already suspect at least one of these.

  • Authorisation is enforced in the handler, and something else calls the service directly.
  • A change was approved because the tests passed and the diff looked ordinary.
  • Input is validated at the edge and trusted everywhere inside.
  • Secrets were taken out of the repository but not out of its history.
  • Whole features were written by an assistant and reviewed at reading speed.
  • Nobody can say which code path a paying customer could use to reach another tenant.
What you get

The deliverables.

Read

  • Authentication and authorisation as implemented — every path to a protected resource, not the one the router advertises
  • Trust boundaries: where untrusted input crosses into a query, a template, a filesystem path or a shell
  • Multi-tenant isolation, down to whether a tenant identifier is derived from the session or taken from the request
  • Cryptography in use: key handling, randomness, comparison, and whether the primitive matches the problem
  • Secret material in the working tree and in history, with the commits that introduced it
  • Business logic an attacker reaches legitimately — ordering, retries, limits, and state that can be replayed

Prove

  • Findings at file and line, with the call path from an entry point an attacker can actually reach
  • Severity and confidence rated separately, so something theoretical never arrives looking like an incident
  • A working proof for anything we call exploitable — or a plain statement that we could not reach it
  • Automated analysis tuned to your stack and placed where it blocks a merge, with the noise switched off rather than ignored
  • Everything we did not read, named, so a short findings list cannot be mistaken for a clean one

How it runs

  1. Orient

    Architecture, entry points and the authorisation model first, before any function. A finding is only a finding once you know what the code was supposed to guarantee.

  2. Read the dangerous paths

    Backwards from the places where damage happens — queries, writes, payments, key material — to every input that reaches them, rather than forwards through files in alphabetical order.

  3. Report and retest

    File, line and call path, a register with named owners, and a 90-day sequence. Once your engineers have closed it we re-read the same paths rather than re-running the same analysis.

Questions

Before you
book the call.

Do we have to hand over our source code?

For the repositories in scope, yes, under mutual NDA signed first. Read-only access to a branch is enough — we do not need commit rights, and we hold no copy of your code once the engagement closes.

Is this a scanner report?

No. We run static analysis because it is cheap and it reads every file, but its output is an input to the review. The deliverable is the reasoning a tool cannot produce: which of those paths an attacker can actually reach, and which findings are noise.

How much of our codebase can you really read?

Not all of it, and anyone quoting line counts is selling something else. We scope by reachability — entry points, the authorisation layer, and whatever touches money, tenancy or key material — and the report names what was left out. An audit that does not state its own limits cannot be acted on.

Most of our code was written by an AI assistant. Does that change anything?

It changes where the findings are, not whether there are any. Generated code is usually idiomatic and locally correct, which is exactly what a reviewer skims past. The recurring issues are a new path that never acquired the authorisation check, and a pattern lifted from a context where it was safe.

Which languages do you review?

Tell us the stack on the call. The method is language-neutral and the reading is not, and we would rather decline a language we do not know well than bill you for learning it.

How does this differ from a penetration test?

A test works from the outside and proves what is reachable today. A review works from the inside and finds what is reachable in principle, including the paths no request has happened to take yet. They find different things, and the review is usually the cheaper way to find logic flaws.

Next step

Scope a source code review.

Thirty minutes, no obligation. We will tell you what is worth doing, including when the answer is less than you expected.