YOUR DIGITAL HUB
← Back to blog

Code audit: when to order one and what it must deliver

9 min read

Cover — Code audit: when to order one and what it must deliver

What a code audit is

A code audit is a structured review of a piece of software by a person outside the team that builds and runs it. It covers the source code, but also what surrounds it: dependencies, tests, development practices, and the build and deployment chain. Its result is not a score. It is an assessment, a list of findings ranked by risk and effort, and an action plan.

It answers a decision question: should this software be kept, corrected, taken over or replaced, and in what order? This article is written for an IT director or executive who has to decide whether to order an audit, frame it, and read what it delivers. It is general information and does not replace the advice of your technical team or your legal adviser.

Situations that justify an audit

Four situations come up most often.

A software takeover. You are changing provider, or bringing into your organisation software written by a third party. You inherit what you do not yet know. The audit establishes what works, what is fragile, and what must be addressed before you take responsibility for the system.

An acquisition or a fundraising round. The buyer or investor wants to know the real value of the technical asset and the risks it takes on. A code audit, sometimes combined with a security audit, gives an independent view, provided the auditor did not build the software.

Doubts about a provider. Deliveries slow down, answers become vague, documentation does not exist, knowledge is concentrated in one person. These signs prove nothing on their own. An audit separates a management problem from a quality problem, and provides factual material for the contractual discussion.

Before a rebuild. Before choosing between refactoring, rewriting or replacing, you need to know what is worth keeping. An audit avoids rewriting correct business rules, or keeping a component that blocks everything else. It also helps size the project, without claiming to price it to the cent.

Other situations arise: repeated incidents on the same scope, the signature of an application maintenance contract, or the departure of the technical lead. In each case the question stays the same: what do I not yet know about this software, and which decision depends on the answer? For an application already described as legacy, the exit approach is covered in our article on legacy applications and their exit plan.

What is examined

A serious audit covers six areas. The depth of each depends on the context.

Structure

The auditor looks at the overall shape of the system: how it is divided into modules, the direction of dependencies between them, the separation between business logic, data access and the interface, the size and complexity of components, and the areas that concentrate most changes. A system where everything depends on everything changes slowly, and each change risks breaking another part.

Dependencies

The software relies on libraries, frameworks and third-party services. The audit checks the version of each, its support status from its publisher, its licence, and known vulnerabilities in the versions in use. An unsupported dependency is not a defect in itself, but it becomes a risk as soon as a flaw is published and no fix exists. The topic corresponds to the "Software Supply Chain Failures" category of the OWASP Top 10 2025, which treats it as a security risk in its own right.

Tests

The auditor examines whether automated tests exist, how far they cover critical journeys, how reliable they are (flaky tests, ignored tests, tests that check nothing useful), and where they sit in continuous integration. A high coverage rate is not enough: a test that only confirms a function runs does not protect against a regression. Without tests, every change is a gamble.

Security practices

Without replacing a security audit, a code audit identifies practices that open risks: secrets stored in code or in the repository, missing or inconsistent input validation, access rights checked by hand in several places, no security logs. If these topics are critical, they deserve a dedicated audit, whose approaches are presented in our article on black box, grey box and white box security audits.

Maintainability

This is the hardest area to make objective. The auditor looks at duplicated logic, the clarity of conventions, architecture documentation, whether technical decisions are recorded, and dependence on one or two people. The central question: can a competent developer who discovers the project understand and change an area without the constant help of the current team?

Build and deployment

The auditor checks whether the software builds reproducibly from the repository, whether environments are described, whether releases follow a known procedure, whether backups can be restored and whether the infrastructure can be rebuilt. Software that can only be deployed by one person, from their own machine, is an operational risk before it is a code defect.

Tools and human reading

Tools provide volume and repetition. Static analysers, complexity and duplication measures, dependency scanners, test coverage reports, and analysis of repository history: they allow the whole codebase to be covered and a trend to be tracked over time.

They also have known limits. They produce false positives, flag minor points, miss design defects and ignore business rules. A debt score calculated by a tool is an estimate: it is useful for comparing over time, not for establishing a verdict. The indicators and their limits are detailed in our article on technical debt.

Human reading remains essential for three reasons. It explains why the code is written the way it is, links a defect to its business consequence, and handles areas that tools cannot evaluate, such as a pricing rule or a payroll calculation. A good audit combines both: tools provide a map, and people choose where to dig.

Also ask for the raw tool reports, with their versions and configurations. Your team can then rerun them after the fixes and measure the trend, instead of receiving a snapshot it cannot reproduce.

The deliverable: what you should receive

A code audit should deliver four distinct elements.

An executive summary. Two or three pages: the overall state of the software, the main risks expressed as consequences (downtime, cost of change, dependence on one person, vulnerability), and the decisions to take and their order.

Ranked findings. Each finding describes the observed fact, its location (module, file, pipeline), the evidence, the consequence and the recommendation. They are ranked on two axes: risk, which combines impact and likelihood, and effort to fix. A simple matrix is enough to read priority:

Low effort High effort
High risk Act immediately Plan a structural project
Low risk Address opportunistically Monitor, without investing

An action plan. It groups findings into three batches: immediate actions (a secret to revoke, a critical dependency to update, a backup to test), projects to schedule (splitting a module, tests on critical journeys, reworking deployment), and monitoring points, meaning indicators to track over time. Each action has a proposed owner and a completion criterion.

Scope and limitations. What was examined, with which tools, on which version of the code, and what was not. A report without a defined scope cannot be checked.

A report that contains only a list of defects, without priorities, evidence or a plan, does not support a decision. Require all four elements before signing, and check that the proposal mentions them.

Code audit, security audit and penetration test

These three services overlap, but they do not answer the same question.

Code audit Security audit Penetration test
Question Is the software sound, maintainable and deployable? Which security risks weigh on the application, and on what evidence? Can an authorised actor reach a specific objective within an agreed framework?
Object Code, dependencies, tests, build, deployment Application, configuration, code or access, depending on the approach chosen A running system, within an agreed scope and rules of engagement
Method Reading, tooling, history analysis Framework (OWASP ASVS, OWASP Top 10), testing and code review Controlled simulation within the authorised framework
Output Maintainability risks and an action plan Security findings with contextualised severity and a remediation plan Scenarios that succeeded or were blocked, attack paths, recommendations

In practice, a code audit is not meant to prove that a flaw is exploitable, and a penetration test says nothing about the maintainability of the software. A code audit may include a security-oriented review, and a security audit often examines the code. The two can be run together, but the statement of work must say which question is being addressed, otherwise the report will answer a different one.

If a regulated context requires a PASSI-qualified provider, check which activities its qualification covers, in particular source code audit, before comparing offers.

Framing the engagement

A code audit is ordered like a diagnosis. A few principles help frame it.

  • Independence. The auditor must not have built the software and, if a candidate to maintain it, must declare so in writing before the order. An audit paid for by the provider it assesses carries less weight.
  • Questions to answer. Formulate three to five decision questions, for example: "can we keep evolving this system for two more years without taking it over?" or "which risks block the signature?". They guide the auditor and allow you to judge the report.
  • Required access. Read access to the repository and its history, existing documentation, pipeline configuration, read access to environments, and interviews with the people who develop and operate the system.
  • Confidentiality. A non-disclosure agreement covers the code, the data and the findings.
  • Debriefing. An interim checkpoint, an oral debrief for management and a written report for the technical team, with the same content at different levels of detail.

What a code audit does not do

A code audit repairs nothing: it describes and ranks. It also does not say whether the software meets business needs, unless those needs have been stated and reviewed. It does not guarantee the absence of defects after delivery, and it does not replace a security audit, a penetration test or a compliance process. It does not judge individuals: it covers the system and its practices. Finally, it describes a state at a given date. Without follow-up, its findings age as the code evolves.

Conclusion

A code audit is justified when the decision at hand depends on the real quality of software you do not yet control: a takeover, an acquisition, doubts about a provider, a rebuild. It should deliver findings backed by evidence, ranked by risk and effort, and an action plan a team can follow. Its value is measured by the decision it informs, not by the number of pages in the report.

To frame a code audit of your software, write to us at contact@your-digital-hub.com or explore our services, from scoping to operations.

Let's talk about your project. Send us the essentials.

Tell us the context, whether it is a new build, a takeover or a migration, the technologies in place and your target date.