October 4, 2026

Software Code Audit: How to Decide Between Fixing and Rebuilding

The rebuild decision is one of the most consequential and least evidenced choices a product owner makes. It is frequently decided by whoever is in the room: the developer who inherited the code...

Blog Image

Key takeaways from the blog

  • A code audit replaces opinion with evidence on the fix-or-rebuild decision. It costs $5,000 to $25,000 and takes one to three weeks, which makes it the cheapest input to a choice that routinely involves six figures.
  • A competent audit covers seven areas: architecture, code quality, test coverage, security, dependencies, infrastructure and deployment, and documentation and knowledge risk. Broken object-level authorisation is the most common serious security finding in business applications.
  • The report should give you a prioritised findings list with effort estimates, an explicit extend-versus-rebuild recommendation with reasoning, a remediation roadmap, and an assessment against your specific roadmap. Code that is fine for maintenance may still be unable to support multi-tenancy, a second platform, or compliance requirements.
  • Rebuild when several conditions stack up: the architecture cannot support your roadmap, the technology is unsupportable, security problems are structural, nobody can safely change it, or remediation approaches 60 percent or more of rebuild cost. One condition alone rarely justifies it, and three together usually do.
  • The biggest rebuild risk is not cost or duration but losing the undocumented business rules the old system encodes. Rebuilds are often quoted below the original build cost and routinely land at or above it, because years of edge cases have to be reimplemented while a live product keeps running.
  • Incremental replacement is usually the best option: keep the system running and replace it piece by piece behind an API, service, or module seam. It typically costs 70 to 110 percent of a rebuild, keeps the product working throughout, and does not require you to be right about everything up front.

The rebuild decision is one of the most consequential and least evidenced choices a product owner makes. It is frequently decided by whoever is in the room: the developer who inherited the code says rebuild, because unfamiliar code always looks worse than code you wrote, and the agency quoting the rebuild agrees, because a rebuild is a larger engagement than a refactor.

A code audit replaces that dynamic with evidence. It costs $5,000 to $25,000, takes one to three weeks, and it is the cheapest input available to a decision that routinely involves six figures.

What an audit actually examines

A competent audit covers seven areas, and a report that skips any of them is incomplete.

Architecture. How the system is structured, whether concerns are separated, whether business logic sits on the server or is scattered through the client, and whether the structure can accommodate where you need to go.

Code quality and consistency. Readability, duplication, complexity concentrations, and whether conventions were followed. Auditors quantify some of this, and the useful output is where the difficulty concentrates rather than an overall grade.

Test coverage. Whether automated tests exist, what they cover, and whether they pass. Coverage percentage alone is a weak metric; whether the critical paths are protected is the real question.

Security. Authentication and authorisation handling, whether access control is enforced in queries rather than in the interface, secrets management, dependency vulnerabilities, and input handling. Broken object-level authorisation is the most common serious finding in business applications.

Dependencies. How current they are, whether any are abandoned, and how far behind the framework version is. A codebase four major versions behind has an upgrade project embedded in it whether you rebuild or not.

Infrastructure and deployment. Whether deployment is repeatable, whether environments are separated, whether backups exist and have been tested, and whether anyone can deploy other than one person.

Documentation and knowledge risk. Whether the system can be understood without its original author, which is frequently the finding that matters most commercially.

What the report should give you

Ask for four specific outputs, in writing, before commissioning.

A prioritised findings list, categorised by severity, with each item's estimated remediation effort. Not a list of observations, a list with numbers attached.

An explicit recommendation on extend versus rebuild versus partial rebuild, with the reasoning stated so you can evaluate it rather than accept it.

A remediation roadmap sequenced by risk and effort, so you can act incrementally rather than facing a single large decision.

An assessment of whether the codebase supports your specific roadmap. This is the question that actually matters and the one generic audits skip. Code that is adequate for maintaining the current product may be unable to accommodate multi-tenancy, a second platform, or compliance requirements.

Bolder Apps sells code audits as a standalone engagement, and the practical reason to buy an audit from a firm you are considering for the remediation is that it shows you their judgement on your actual code rather than on a sales call. The reason to be alert while doing so is the obvious incentive, which is why the recommendation should come with reasoning you can interrogate.

When to rebuild

Five conditions that genuinely justify it. One alone rarely does; three together usually do.

The architecture cannot accommodate your roadmap. Not that it is ugly, that it structurally cannot support what you need, such as a single-tenant design where you now need multi-tenancy, or client-side business logic where you now need a second platform.

The technology is genuinely unsupportable. An abandoned framework, a language version past end of life, or a dependency with no maintained successor.

Security problems are structural rather than local. Authorisation absent by design rather than missing in three places.

Nobody can safely change it. No tests, no documentation, no original author, and every change breaks something unrelated. This is the practical definition of unmaintainable and it is a legitimate rebuild trigger.

Remediation cost approaches rebuild cost. If the audit's remediation estimate is 60 percent or more of a rebuild, rebuilding usually wins because you also get a codebase you can extend afterwards.

‍


Frosted fork of two glass paths, one red

‍

When to extend

Extending is right more often than rebuild advocates suggest, and the conditions are equally identifiable.

The architecture is sound even if the code is untidy. Untidy code inside a reasonable structure is remediable incrementally and cheaply relative to a rebuild.

The product works and has users. A rebuild puts a working revenue stream at risk for a benefit users will not see, which is a decision that needs to be worth it.

The problems are concentrated. Three bad modules in an otherwise reasonable system is a refactoring project, not a rebuild.

The domain logic is valuable and poorly documented. Years of accumulated edge-case handling lives in that code, and a rebuild reimplements it from memory, which is where rebuilds most often fail: the new system is cleaner and does not handle the fourteen exceptions the old one had learned about.

Contrary to the instinct that produces most rebuilds, the largest risk in rebuilding is not cost or duration. It is losing the undocumented business rules the existing system encodes. Those rules are why the old code looks messy, and they are also why it works.

The third option, which is usually the best one

Incremental replacement, sometimes described as strangling the old system, is the option that gets skipped because it is less satisfying than either alternative.

You keep the existing system running and replace it in pieces. A new service takes over one area, traffic moves to it, and the old code for that area is retired. Repeat. The product keeps working throughout, each step is independently valuable, and you can stop when the remaining old code is good enough.

This suits most situations where the architecture is partly sound, where the product has users you cannot risk, and where a rebuild's duration is longer than your business can wait. It costs more in total than a clean rebuild would in theory, and it does not require you to be right about everything before you start.

The precondition is a seam: an API boundary, a service boundary, or a module boundary you can substitute behind. Identifying whether one exists is a standard audit output and worth asking for explicitly.

Cost comparison

PathTypical costRisk profile
Audit only$5,000 to $25,000None, produces information
Targeted remediation15 to 40 percent of rebuild costLow, product keeps working
Incremental replacement70 to 110 percent of rebuild costLow, spread over time
Full rebuildBaseline, often 70 to 100 percent of original buildHigh, feature parity risk

Note the rebuild figure. Rebuilds are frequently quoted below the original build cost on the reasoning that the requirements are known, and they routinely land at or above it, because the original build did not include reimplementing years of accumulated edge cases while keeping a live product running.

‍


Frosted foundation slab with red crack under tower

‍

What to provide, and what to expect to be asked

An audit needs access, and preparing it in advance shortens the engagement.

Repository access including full commit history, since the history reveals how the system was built and how frequently it changes. Infrastructure configuration and deployment documentation, or an honest statement that none exists. A walkthrough with anyone who knows the system, which is the highest-value hour in the whole engagement when it is available. Your roadmap for the next twelve to eighteen months, because the central question is whether the codebase supports where you are going rather than whether it is tidy. And any existing test suite with its current pass state.

Expect to be asked what has already gone wrong: which changes broke unrelated things, which areas the team avoids touching, and what takes surprisingly long. Those answers point auditors directly at the problems, and withholding them to get an unbiased read is a false economy.

Reading the report without being technical

Four things a non-technical owner can assess in an audit report.

Whether findings have effort estimates attached. Observations without numbers cannot inform a decision.

Whether the recommendation includes reasoning you can follow. A conclusion you cannot interrogate is an assertion.

Whether it answers the roadmap question specifically. A generic quality assessment is less useful than a direct statement about whether multi-tenancy, a second platform, or compliance requirements are achievable in the current structure.

Whether key-person risk is addressed. If one person is the only one who understands the system, that is a commercial risk with a name, and it belongs in the report.

Bolder Apps sells code audits as a standalone engagement, and the request worth making of any auditor is that the report be written to be readable by someone making a budget decision rather than only by an engineer.

Other reasons to commission an audit

Three situations beyond the rebuild question.

Pre-acquisition or pre-investment diligence. Buyers and investors increasingly examine architecture, test coverage, security, and key-person risk. An audit before the process is cheaper than a finding during it.

Before changing development partners. An independent assessment of what you are inheriting, which also protects the incoming team from being blamed for pre-existing problems.

Before a security review. If enterprise or regulated customers are in your pipeline, their review will surface findings. Discovering them first is considerably cheaper than remediating under sales pressure.



Sources

  • OWASP Application Security Verification Standard, owasp.org
  • OWASP Top 10, including broken access control, owasp.org
  • NIST Special Publication 800-53, security and privacy controls
  • Martin Fowler's writing on incremental replacement patterns, martinfowler.com
  • SOC 2 Trust Services Criteria, AICPA
Quick answers

Frequently Asked Questions.

Who should perform the audit?

A firm independent of whoever wrote the code, and ideally not the only firm bidding for the remediation. If the auditor is also a candidate for the follow-on work, insist that the report includes reasoning and effort estimates you can take to other bidders.

How long does an audit take?

One to three weeks for most codebases, longer for large or multi-system estates. It requires repository access, a walkthrough with someone who knows the system if available, and access to infrastructure configuration.

Will an audit tell us exactly what to do?

It should give a prioritised list with effort estimates and a recommendation with reasoning. It cannot make the commercial decision, because that depends on your roadmap, your runway, and your risk tolerance, all of which are yours.

Is a rebuild ever a purely technical decision?

No. It is a commercial decision informed by technical evidence. A rebuild that is technically justified and commercially ruinous is the wrong choice, and so is extending a system that cannot support the product you have committed to building.

What if the audit says our code is fine and we still hate working with it?

That is worth taking seriously and investigating separately. Developer frustration frequently points at process rather than code: slow builds, painful deployment, no local environment, no tests to give confidence. Those are cheaper to fix than a rebuild and often produce most of the perceived benefit.

Get in touch

Let's discuss your goals

Schedule a meeting via the form here and we’ll connect you directly with our director of product—no salespeople involved.

What happens next?

Book a discovery call
Discuss and strategize your goals
We prepare a proposal and review it collaboratively
Clutch Boutique client logo
Clutch Award Badge
Clutch Award Badge

Bolder Starts Here

Please enter a valid phone number
Join 30+ founders who shipped with Bolder Apps
By submitting this form, you agree to our Terms of Use and Privacy Policy
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.