Kief Studio

Building Right the First Time: Why Software Quality Costs Less Than Fixing It Later

Protect

  • Published
  • Updated
  • 9 min read
Thin violet-magenta and gold neon lines run at right angles across a black field and meet at a few small glowing nodes.

TL;DR: Yes, building it right the first time usually costs less. NIST's analysis of software testing shows a defect found after release can cost many times more to fix than one caught in design. The CrowdStrike outage and the Tea app exposure were software quality failures, not clever hacks. Decide defaults, test edge cases and stage releases.

Software quality is the cheapest security control most businesses never budget for. You have probably seen the line that a bug costs $100 to fix in design and $10,000 in production, usually credited to IBM. I went looking for that exact figure and could not find it in any IBM or government publication. The idea behind it is real, though, and the real numbers make the case well enough without inflating them.

We wrote an earlier version of this note in March. This update keeps the argument and replaces the numbers we could not trace with ones we could.

Is software quality really cheaper than fixing problems later?

Yes, and the best-known evidence is American government research. In 2002, NIST published a study of what weak software testing costs the U.S. economy. Its example table of the relative cost to repair a defect introduced during design runs "1X 5X 10X 15X 30X" from the design stage through "Post-product Release." The report explains: "errors introduced during this stage and found in the same stage cost 1X to fix. But if the same error is not found until the integration and component/RAISE system test stage, it costs 10 times more to fix." (NIST, The Economic Impacts of Inadequate Infrastructure for Software Testing (opens in a new tab))

Two honest notes on that table. NIST labels it "Example Only," so treat the multipliers as an illustration, not a law of nature. And the same report estimated that "the national annual costs of an inadequate infrastructure for software testing is estimated to range from $22.2 to $59.5 billion." That was 2002 dollars, for one slice of the problem.

The newer estimate is bigger. The Consortium for Information and Software Quality's 2022 report "estimates that the cost of poor software quality in the US has grown to at least $2.41 trillion," and that accumulated technical debt "has grown to ~$1.52 trillion." (CISQ, 2022 (opens in a new tab)) You do not need the exact multiplier to see the direction. Every stage a defect survives, more people, more data and more systems depend on it. Poor software quality compounds.

What did the CrowdStrike outage teach about software quality?

On July 19, 2024, CrowdStrike pushed a routine content update to its Windows sensor. Microsoft estimated that "CrowdStrike's update affected 8.5 million Windows devices, or less than one percent of all Windows machines." (Microsoft, July 2024 (opens in a new tab)) CrowdStrike's own timeline says the update went out at "04:09 UTC" and the defect "was reverted on Friday, July 19, 2024 at 05:27 UTC." (CrowdStrike, preliminary post incident review (opens in a new tab)) Seventy-eight minutes of exposure. Microsoft's same post describes "Quickly posting manual remediation documentation and scripts" to help customers recover, which tells you how the cleanup went.

The root cause was a software quality defect

CrowdStrike's root cause analysis is worth reading in full. A new template type "defined 21 input parameter fields, but the integration code that invoked the Content Interpreter with Channel File 291's Template Instances supplied only 20 input values." Its finding number two is blunt: "A runtime array bounds check was missing for Content Interpreter input fields on Channel File 291." The mismatch slipped through testing "in part" because of "the use of wildcard matching criteria for the 21st input during testing." (CrowdStrike, Root Cause Analysis (opens in a new tab))

Nobody hacked anything. This was software quality, not an attack. A count of inputs did not match, a check that would have caught it was not there, and the test data never hit the edge case. That is a software quality failure with security-scale consequences.

What CrowdStrike changed afterward

The fixes read like a checklist any team can use. CrowdStrike added validation of "the number of input fields in the Template Type at sensor compile time," added "runtime input array bounds checks," and moved to "a staggered deployment strategy for Rapid Response Content in which updates are gradually deployed to larger portions of the sensor base, starting with a canary deployment." Every one of those is a software quality practice, and every one is cheaper before an incident than after.

Why are security and software quality the same problem?

Because most security failures are software quality failures: defaults and edge cases that nobody decided on. Look at the Tea app. In July 2025 the dating safety app said hackers had accessed "72,000 images. That number includes 13,000 selfies and photo IDs submitted for account verification," according to TechCrunch, which also noted that 404 Media "reported that 4chan users claimed to be sharing personal data and selfies from Tea after discovering an exposed database." (TechCrunch, July 2025 (opens in a new tab)) CNN reported the same 72,000 figure and that "The app says photos are deleted following account approval." (CNN, July 2025 (opens in a new tab))

Put two facts next to each other: verification photos that were supposed to be deleted, and storage that was reportedly reachable from outside. Neither needs an advanced attacker. Both are design decisions that were never made on purpose. Configuration is engineering, and a default is a decision someone made for you.

What the government now asks about software quality

CISA's Secure by Design program says it plainly: "During the design phase of a product's development lifecycle, companies should implement Secure by Design principles to significantly decrease the number of exploitable flaws before introducing them to the market." It also names who pays when that does not happen: "the cybersecurity burden is placed disproportionately on the shoulders of consumers and small organizations." (CISA, Secure by Design (opens in a new tab))

NIST's Secure Software Development Framework starts from the same gap: "Few software development life cycle (SDLC) models explicitly address software security in detail." Its practices aim to "reduce the number of vulnerabilities in released software" and "address the root causes of vulnerabilities to prevent future recurrences." (NIST SP 800-218 (opens in a new tab)) That is software quality language. Security falls out of it.

Does AI-generated code make software quality worse?

It can lower software quality, if nobody reviews it. Veracode's 2025 GenAI Code Security Report "analyzes the security of code generated by over 100 large language models across Java, JavaScript, Python, and C#" and found that "AI-generated code introduced risky security flaws in 45% of tests." It also found that "Larger, newer AI models didn't improve security." (Veracode, 2025 (opens in a new tab))

The failure mode is the same one as Tea's. NVD's record for CVE-2025-48757 describes "An insufficient database Row-Level Security policy in Lovable through 2025-04-15" that "allows remote unauthenticated attackers to read or write to arbitrary database tables of generated sites." The record also notes the issue "is disputed by the Supplier because each individual customer of the Lovable platform accepts a responsibility over protecting the data of their application." (NIST National Vulnerability Database (opens in a new tab)) Read that dispute carefully. Whoever is right, the owner of the app is the one holding the risk.

Code that runs is not the same as code that works, and software quality is the difference. I wrote more on whether AI-generated code is safe for a business (opens in a new tab), and we looked at what happened when thousands of AI-built apps shipped to the open web with public as the default.

What does building it right look like for a small business?

Hands sketching a technical drawing with a pencil beside a metal bracket and calipers, a monitor glowing behind
Software quality starts on paper: decide the edge cases before anyone writes code.

Take a hypothetical: a property manager in Grafton wants a tenant portal for maintenance requests and rent documents. Here is what software quality looks like on that project, in the order it costs least.

Decide what done means before code

Write down who can see what. Tenants see their own unit, staff see their buildings, the owner sees everything. That one page of requirements discovery decides the access rules that the Tea and Lovable cases got wrong. It costs an afternoon.

Make the defaults decisions, not accidents

  • Storage private by default; uploaded leases and IDs never public.
  • Delete what you promised to delete, on a schedule you can prove.
  • Multifactor sign-in for staff and the owner.
  • Logging on from day one, so you can answer "who saw this" later.

Test the edge case, not just the happy path

The CrowdStrike test data used wildcards, so the one input that broke never got exercised. Test with an empty upload, a giant one, a tenant trying another unit's URL, and a request with a missing field. Software quality lives in those boring cases.

Release in stages

Ship to one building before twenty. A staged rollout protects software quality in production. It is what CrowdStrike adopted after the fact, and it works at any size.

Review generated code like a new hire's

Use AI to go faster, then read the diff. Check access rules and secrets by hand. Track the open source packages the code pulls in; they are part of your software quality too.

How do you check software quality on a system you already have?

You do not need to rebuild to start. Ask your developer or vendor five questions:

  1. Who can reach the database and file storage from the internet, and how do you know?
  2. What happens when a user changes an ID in the URL?
  3. How are updates tested and rolled out, and how do you roll back?
  4. Which third-party packages do we depend on, and who watches them for known flaws?
  5. What do we log, and for how long?

Then measure. The free security headers checker on kief.dev (opens in a new tab) shows a few defaults in a minute. A penetration test proves what an attacker can actually reach. If the same class of finding keeps coming back, the problem is in the design, and patching instances will not end it.

Old systems deserve the same look. Much of the technical debt CISQ counts sits in software that worked fine years ago. Legacy modernization is often the cheapest software quality fix left, because each patch on an old design costs more than the last.

Frequently asked questions

Is it cheaper to fix bugs early in development?

Yes. NIST's 2002 study illustrates a defect from the design stage costing about 30 times more to fix after release than in design. NIST labels the table an example, but the direction is consistent.

Where does the $100 versus $10,000 bug statistic come from?

We could not trace that exact figure to IBM or any primary source. The traceable evidence is NIST's 2002 report on software testing and CISQ's estimates of the cost of poor software quality.

Was the CrowdStrike outage a cyberattack?

No. CrowdStrike's root cause analysis describes an input count mismatch and a missing runtime bounds check in a content update. It was a software quality defect that crashed about 8.5 million Windows devices, by Microsoft's estimate.

Is AI-generated code safe to use in a business app?

It can be, with review. Veracode found security flaws in 45% of its AI code tests. Treat generated code like a new developer's work: read it, test it and check access rules by hand.

What is secure by design?

It is CISA's push for software makers to build security in during design, so products ship with fewer exploitable flaws and safer defaults, instead of leaving the burden on customers.

How can a small business check the software quality of an existing app?

Ask who can reach your data from the internet, how updates are tested and rolled back, and which packages you depend on. Then confirm with a scan or a penetration test.

Where we fit

Kief Studio is in Shrewsbury, and our custom web application work starts the way this note recommends: we map how the work happens today before choosing a screen or a stack, then design and build the application, host it on dedicated infrastructure with backups and a written deploy path, and keep it fast, patched and yours after launch. The code and the data are yours. Security is included on what we host, because security is a byproduct of good engineering. Some of our client relationships now run past 13 years, which is what building it right buys you.

If you already have a system that keeps producing the same findings, a security architecture review reads the design, follows the data and recommends changes in order of risk. Our vulnerability management ranks findings by your real exposure, fixes them, and verifies each fix holds on the next pass.

First conversation is free. No commitment.

Tell us what you are building, or what keeps breaking

Related articles

  1. Build

    How a White-Label Development Partner Works With an Agency

    How a white label development partner works with a Massachusetts agency: client communication, IP assignment, logins, hosting, standards and red flags.

    Amelia Gagne

  2. Build

    Your Clients Don't Know We Exist. That's the Point of White Label Development.

    White label development lets agencies say yes to custom builds without a full engineering bench. How it works, where it fails, and starting with one project.

    Brian Gagne

  3. Build

    About 200,000 Projects a Day Start on One AI App Builder. It Now Notices When You're Stuck, and 'Fix It, Fix It' Is the Sound of Software Nobody Can Read.

    An AI app builder gets you a first version fast. When fix-it prompts stop working, here is how to check you can read, move and hand off what it built.

    Brian Gagne