AI finds security flaws faster too: plan for maintenance

Published 7 min read By

AI speeds up building software, and it speeds up finding and exploiting the flaws in it just as much. Attackers already use AI agents to look for vulnerabilities and write exploit code, the gap between a flaw's disclosure and its exploitation is now measured in days, and AI-generated code brings weaknesses of its own. The consequence is simple: maintenance is no longer an occasional chore but a cadence, with tasks, owners and a budget.

AI speeds up attackers as well as builders

The same models that write code can read it for weaknesses, test them and write exploit code, and attackers are already using them this way.

In November 2025, Anthropic reported that a group it assessed as state-sponsored had used its Claude Code tool to target roughly thirty organisations, with AI performing 80 to 90% of the campaign. The AI inspected target systems, identified and tested vulnerabilities by researching and writing its own exploit code, and harvested credentials. The attackers succeeded in a small number of cases. Anthropic also described the limits: the AI sometimes hallucinated credentials, or claimed to have found secret information that was in fact public.

Fully autonomous attacks are not routine yet, but the direction is clear: looking for flaws in your application keeps getting cheaper. Defenders and security researchers use the same techniques to find bugs before attackers do, and every bug they find becomes a patch that someone has to apply. Either way, the amount of security work around an application goes up.

The window between disclosure and exploitation is shrinking

Exploitation now often follows disclosure within days, so a quarterly patching routine can leave you exposed for weeks.

Mandiant, part of Google Cloud, tracks the average time-to-exploit of vulnerabilities exploited in the wild. In its analysis of 2023 data, that average fell from 63 days in 2018 and 2019 to 32 days in 2021 and 2022, then to 5 days in 2023. Two caveats: the five-day figure excludes statistical outliers (with them, the average is 47 days), and most of these vulnerabilities were exploited as zero-days, before any patch existed. The trend also predates AI agents. Tools that automate vulnerability research are likely to push it further in the same direction.

For a business application, the lesson is concrete. When a critical vulnerability is published in a framework or library you use, the question is whether you can deploy the fix within days, not whether someone will get to it next quarter. That requires up-to-date dependencies, automated tests and a deployment process you trust.

AI-generated code brings its own risks

AI-generated code works more often than it is secure, and it adds three specific risks: insecure patterns, outdated or non-existent dependencies, and secrets left in the code.

  • Insecure patterns. In Veracode's 2025 GenAI Code Security Report, code generated by more than 100 language models introduced security vulnerabilities in 45% of cases, and the models failed to defend against cross-site scripting in 86% of the relevant cases.
  • Outdated or invented dependencies. Models suggest library versions from their training data, which can be years old and carry known vulnerabilities. They also invent packages that do not exist. A study presented at USENIX Security 2025 analysed 576,000 code samples from 16 models: the average rate of hallucinated packages was at least 5.2% for commercial models and 21.7% for open-source models, with 205,474 unique invented package names. An attacker can publish malicious code under one of those names, a technique now called "slopsquatting".
  • Secrets in the code. Asked to "make it work", an assistant may write an API key straight into a configuration file or into front-end code, from where it ends up in the repository or in every visitor's browser.

Each of these risks has a known countermeasure:

Risk Example What catches it
Insecure pattern A query built by concatenating user input, an endpoint that checks the login but not who owns the record Tests derived from the spec, static analysis in the pipeline, tests for access rules
Outdated dependency A library version with a published vulnerability Automated dependency scanning and update pull requests
Invented package An install command for a package that does not exist, or that an attacker published Checking every new dependency: it exists, is maintained, has a history and is the one intended
Secret in the code An API key in a committed file Secret scanning on every change, environment variables or a secrets manager, rotating any exposed key

None of this makes AI-generated code unusable. It means that code goes through the same automated checks as any other, which is what "AI-accelerated, quality-gated" means in my practice: I use AI tools to ship faster, and every change passes an automated quality harness (tests, static analysis, security and dependency scans, performance checks) before it ships.

Maintenance is now a cadence, not an event

Maintenance is no longer something you do once a year; it is a set of small, regular tasks plus a plan for the day something goes wrong.

A realistic maintenance plan for a business application includes:

Task Suggested cadence What it covers
Critical security patches Within days for internet-facing systems Vulnerabilities in frameworks, libraries, servers and managed services
Dependency updates Automated every week, reviewed and merged regularly Libraries and their own dependencies
Runtime and framework upgrades Planned ahead of end-of-life dates Language versions, frameworks, databases
Monitoring and alerting Continuous, with alerts sent to a person Uptime, errors, slow responses, failed jobs, unusual traffic
Backups and restore tests Daily backups, a restore test every quarter Database and files, stored separately from production
Access review Every quarter Former staff and contractors, unused accounts, API keys
Security review For each significant change, plus once a year New endpoints, permissions, secrets, configuration
Incident response plan Written once, rehearsed every year Who decides, how to roll back, who to inform

The last row has a legal side in Europe: under the GDPR, a personal data breach must generally be notified to the supervisory authority within 72 hours of becoming aware of it. Deciding who does what is much easier before an incident than during one.

Applications with AI features add one more item. Model versions are retired, prices change and outputs shift between versions, so someone needs to check that the application still behaves as expected. This is the scope of my hosting and maintenance work, including taking over applications that someone else built.

How to budget maintenance

A commonly cited rule of thumb puts maintenance at 15 to 20% of the initial build cost per year; use it as a starting point and adjust it to how exposed your application is.

My article on what custom software costs applies that rule to a €60,000 build: €9,000 to €12,000 a year for maintenance, before hosting and new features. What moves the figure:

Pushes the budget up Pushes the budget down
Public application exposed to the internet Internal tool behind single sign-on
Personal, health or payment data No sensitive data
Many dependencies and third-party integrations Few, well-maintained dependencies
AI features that call external models No external AI calls
Few automated tests, manual deployment Good test coverage, automated deployment

AI also lowers some maintenance costs. Dependency upgrades and the tests that go with them are exactly the kind of well-defined work assistants handle well. That is a good use of the time AI saves, as long as each change still passes the quality gates.

A maintenance checklist

Use this list to check whether an application you own is maintained or merely running.

Plan it before launch

The cheapest moment to plan maintenance is before the application goes live, when tests, monitoring, backups and automated updates can be built in rather than bolted on. After launch, the plan is what turns a newly published vulnerability into a routine update instead of an emergency.

If your company runs tools that were built quickly, by a team or with AI, outside any maintenance plan, start with an inventory, as I describe in shadow IT in the AI era. If you are about to build something new, a precise specification reduces both the bugs and the maintenance to come: see why specifications are now the bottleneck.

FAQ

How much should I budget for application maintenance?

A commonly cited rule of thumb is 15 to 20% of the initial build cost per year, before hosting and new features. Treat it as a starting point: an internal tool with few dependencies may need less, while a public application handling personal or payment data may need more.

Is AI-generated code less secure?

It is not secure by default. In Veracode's 2025 tests across more than 100 language models, generated code introduced a security vulnerability in 45% of cases. AI-generated code needs the same automated scanning, testing and quality gates as any other code.

What is slopsquatting?

Slopsquatting is an attack in which someone publishes a malicious software package under a name that AI coding tools tend to invent. A developer who installs the suggested package without checking it installs the attacker's code. Checking that every new dependency exists, is maintained and is the one you intended prevents it.

How quickly should security patches be applied?

For critical vulnerabilities on systems exposed to the internet, within days rather than weeks, because exploitation now often follows disclosure quickly. Less exposed systems and lower-severity issues can follow a regular weekly or monthly cycle. What matters is deciding the policy in advance and naming someone responsible for applying it.

What does a software maintenance plan include?

Dependency and framework updates, a patching policy, monitoring with alerts, automatic backups with regular restore tests, periodic security and access reviews, and a written incident response plan. Each task needs a cadence and a named owner. Without those two, maintenance tends to happen only after something breaks.

More articles