All articles
10 min read

What a code audit actually checks

The short answer

A code audit answers four questions: is it secure, is it correct, could someone else maintain it, and does it match what was contracted. Each is answered with specific evidence from the repository rather than an opinion, and each finding carries a remediation estimate in hours so the conclusion is negotiable rather than emotional.

Why you would commission one

Three situations account for almost every audit we run. A final invoice is due and the buyer cannot judge whether the work is finished. An acquisition is being considered and the seller's technical claims are unverified. Or a team has inherited a codebase and cannot estimate anything in it.

All three share a shape: somebody is about to commit money on the strength of a technical claim they cannot evaluate. The audit's job is to convert that claim into evidence.

Question one: is it secure

This section is non-negotiable, and it is where most audits find their must-fix items.

  • Authentication: how sessions are issued, stored, expired and revoked, and whether passwords are hashed with a current algorithm.
  • Authorization: whether every endpoint checks permission server-side, derived from the session rather than from a value the client supplied.
  • Object-level access: whether changing an ID in a request returns data belonging to someone else.
  • Secrets: whether keys are in the repository history, in the client bundle, or in a configuration file that shipped.
  • Input handling: injection, unsafe rendering, and file uploads that never validate what they receive.
  • Dependencies: known vulnerabilities, unmaintained packages, and how far behind the lock file has drifted.
  • Data exposure: what an ordinary authenticated user can reach that they should not, and what an unauthenticated one can.

Question two: is it correct

Secure code that computes the wrong answer is still broken. This section looks for the failures that show up as silent data damage rather than as an error message.

  • Schema integrity: foreign keys, unique and not-null constraints, and whether the database refuses states the code assumes cannot happen.
  • Transactions: whether operations that must succeed or fail together actually do.
  • Idempotency: whether a webhook or payment callback delivered twice causes something to happen twice.
  • Error handling: whether failures are surfaced and retried, or swallowed and forgotten.
  • Money and dates: rounding, currency handling, time zones and daylight-saving arithmetic, which is where quiet financial bugs live.
  • Test coverage on the logic that would cost real money if it were wrong, which is a different question from overall coverage percentage.

Question three: could someone else maintain it

This is the one buyers underestimate and the one that determines what the asset is actually worth. A working product nobody else can safely change is a liability with a nice interface.

  • Could a competent stranger clone the repository, run it locally, and understand it within a day?
  • Is there a migration path for the database, or does the schema exist only in a live console?
  • Are there environments, or is production the only one?
  • Is deployment automated and reversible, or a documented ritual nobody has rehearsed?
  • Do backups exist, and has anyone ever restored one?
  • Is the structure consistent, or does each feature use a different pattern because it was written on a different day?

Question four: does it match what was contracted

The most direct question and the one that decides invoices. We take the specification, statement of work, or the demo that was signed off, and check it feature by feature against what exists in the repository.

The interesting findings are rarely missing features, which the buyer has usually already noticed. They are features that exist as a working interface with nothing behind it, and features that work only for the exact input used in the demo.

What the report gives you

SectionWhat it contains
VerdictTwo paragraphs a non-technical reader can repeat accurately to someone else
Must-fixFindings unsafe to ship or operate, each with file, evidence and hours
Should-fixFindings that will cost money later, with the timescale on which they bite
CosmeticEverything real but not urgent, so nobody can claim it was hidden
Remediation estimateHours and money per band, so the negotiation has numbers in it
Maintainability opinionWhether a new team could take this over, and at what cost

Every finding cites the file and the specific evidence. A finding a developer cannot verify for themselves is an opinion, and opinions do not settle invoices.

What you can check before hiring anyone

  1. 01Change an ID in an API request to one belonging to another account and see whether data comes back.
  2. 02Search the client bundle for your provider key prefixes.
  3. 03Ask for the migration files. If there are none, the schema lives in one place and cannot be reproduced.
  4. 04Ask when a backup was last restored, not whether backups exist.
  5. 05Ask how the last deployment would have been reversed.
  6. 06Clone the repository onto a clean machine and try to run it using only the written instructions.

Six questions, no engineering degree required. If several land badly, a full audit will find more, but you already have enough to hold a serious conversation.

Related questions

How long does a code audit take?
Typically five to ten business days from the point read access is granted, ending with a written report and a walkthrough call. Larger or undocumented systems take longer, and we say so before starting rather than after.
Do you need the original developer's cooperation?
No. Read access to the repository is enough, and audits are frequently commissioned precisely because that relationship has broken down. Access to the contract or specification makes the fourth section sharper but is not required.
Can I use the report in a dispute?
Yes, and it is written to be usable that way: plain English, every finding tied to specific evidence, and a remediation estimate in hours and money. It establishes the technical facts your lawyer then argues from. We do not provide legal opinion.
Will you fix what you find?
Only under a separate engagement quoted afterwards. Keeping the audit independent of the remediation is the point, and many clients hand the report to their existing developer instead.

Two ways to start, both of them cheap.

Book a call and talk it through, or write the problem down and send it — whichever you would actually do today. Either way you get a reply from an engineer within one business day, and an honest answer about whether we are a fit.

Not ready for either? A $600 consulting session buys one straight answer with no obligation to hire us.

Rev. 01Book a call