CERTAINCE Logo

How Software Stays Secure When AI Agents Build and Maintain It

When AI agents change your software every day, three checks keep it secure: checking programs, a second AI and human approval. Shown with NEO Expo's software.

Illustration: security layers as an app window behind layered shield rings with a golden keyhole

When AI agents change your software every day, one worry comes up quickly: who makes sure it stays secure along the way? Any change can open a gap, and no person reads every line any more. Software that AI agents build and maintain stays secure when every change goes through the same checks before it goes live.

The answer is three checks. Checking programs cover everything that rules can check: tests, scheduled scans for security gaps and limits in the agents' access. A second AI, usually from another provider, reads every change before it is accepted. Human approval comes last: only the version a person has approved goes live. What an AI agent may read and change is set in its access. An instruction on its own enforces no limit.

What can go wrongWhat catches itCheck
A library has a known security flawA scheduled run checks for new critical security advisories every weekChecking programs
A password or key ends up in the codeKeys live outside the code, the second AI reads every changeA second AI
A change shows data to the wrong usersTests for permissions and for keeping data separateChecking programs
An agent does more than its task requiresIts access allows only what the task needsChecking programs
An error that no test coversA second AI, usually from another provider, reads every changeA second AI
A faulty change goes liveOnly the version a person has approved goes liveHuman approval

We show what this looks like day to day with the inventory and logistics software of the exhibition stand builder NEO Expo. The software runs warehouse, projects and logistics in one system. Since the end of May 2026, AI agents have been developing it further. The last part is for anyone who sets up such checks.

When a library in your software has a security flaw

Every modern application is built on third-party libraries. When a flaw becomes known in one of them, a security advisory is published. Your software is then open to attack, even though nobody changed it. The NIST Secure Software Development Framework therefore treats secure development as continuous work. One of its four areas is responding to vulnerabilities.

For the software, a scheduled run checks every week whether new critical security advisories affect the app. Each run leaves a report. The AI applies the updates, tests and a second AI check them, and they go live only after our approval. In the six levels of working with AI this is the level "Let it run": the run starts on its own, and a person approves the result.

On top of that, a daily run goes through the app's error messages. The AI fixes small errors itself and creates tasks for larger ones. Tests and a second AI check every fix, and it goes live only after our approval. On 26 October 2026 this run read the error messages up to that morning. The fix, with tests, was accepted before noon and live in the early afternoon after our approval.

When a password or key ends up in the code

Access keys to databases, cloud accounts or payment services do not belong in the source code. Whatever was in the code once stays in its version history, even if a later change deletes it. An AI agent that wants to get something running quickly may write a key straight into it.

That is why keys live in separate files outside the versioned code. For our projects on Cloudflare, each production repository has its own key. It reaches only the services the project uses and sits in an unversioned file next to the deploy configuration. Secure cloud access for AI agents describes how we made that change.

Alongside the second AI, a program that searches for known patterns of keys and passwords before every merge is worth adding. If a key does turn up in the code, revoke it at once and create a new one.

When a change opens data to the wrong users

A small change to a query can show a user data that belongs to another organization. Nobody notices it in the interface. That is why the server checks every permission. The interface alone is not enough.

In the software, data belongs to one organization at a time. Warehouse and on-site teams also record movements offline. On sync, the server checks the same stock, reservation and organization rules as online, because a device without a connection cannot decide a permission.

Tests protect such rules. Since we started developing the software with AI agents, about a third of the changed code is test code. Before, it was under 1 percent. A version goes live only once it has passed all browser tests. For the second AI, a stricter rule applies in our process: if a change touches sign-in, permissions, payments or how data is stored, a missing test counts as an error in itself. How we check AI-written code before it goes live describes the whole process.

When an AI agent does more than its task requires

An instruction tells the agent what it should do. Its access decides what it can do. An agent can overlook or misread a rule in its instruction. A limit in its access still holds: the tool refuses whatever the access does not allow.

Each agent working on the software has its own copy of the code, separate from the app NEO Expo is using. Only the version we have approved goes live. The system rejects an approval from the AI itself. In our own office, our agents' mailbox access has no permission to send. Where AI agents fail explains why a rule like that belongs in a permission.

Not every limit can be set in the access. A rule that exists only in the instruction is a request to the agent. What it is meant to prevent has to be caught by a later check: a test, the second AI or the approval. Even narrow access does not make misuse impossible. It limits the damage when an agent gets something wrong.

When an error slips through that no test covers

Tests find what someone wrote down as a test beforehand. For everything else, a second AI reads every change to the code. It usually comes from a different provider than the agent that wrote the code. While it holds an error open, the change is not accepted. The four-eyes principle for AI agents explains why an author is poor at checking their own work.

On the morning of 3 November, NEO Expo asked by WhatsApp for two changes to the software. AI agents implemented them. A second AI reviewed them in seven rounds and reported errors in five of them. All were fixed before the change was accepted.

Who decides what goes live

An accepted change is not live yet. For NEO Expo's software, nothing goes live before we have approved exactly that version.

For the two requests of 3 November, a video of the change was ready half an hour after it was accepted. After our approval it was live less than ten hours after the message.

For whoever sets this up: the checks in detail

This part is for technical leads who want to build such checks or assess them at a provider.

What the checking programs cover

  • Before the second AI: formatting, type checking and the affected tests. A tool looks for code the change leaves unused.
  • Before going live: all browser tests.
  • On a schedule: every week the scan for new critical security advisories, every day the review of error messages, each with a report.

How the second AI reviews

The second AI runs in a fresh session and may change nothing. It sees the brief and the change. It does not see the conversation in which the change was made. A reported error needs an exact place in the code and a concrete trigger, meaning which input leads to which wrong result.

What the checks are based on

The OWASP Application Security Verification Standard turns areas such as access control, validation, logging, data protection and APIs into testable requirements. Neither it nor the NIST framework prescribes a fixed set of controls for every application. The choice and depth of review follow the threat, the data and the business impact.

What the checks cannot do

A check finds only the errors it can recognize. A second AI also misses things sometimes. Since October 2026, errors that got through despite review become a test set for our reviewer. That is why approval comes last, and why narrow access still matters when every check has passed. What "all checked" is worth describes what a green tick proves.

Does every application need the same security controls?

No. Review depth follows the data, reach, business impact and recoverability. An internal reading list needs fewer controls than a customer-data portal or an application that changes prices and payments. The questions about access, changes and recovery still apply every time.

How do you handle AI output inside the application?

Like input from an outside system: check it, limit what it may do and have a person confirm critical values. In NEO Expo's inventory and logistics software, a photo pre-fill proposes the name, description, color, category and unit of a new item. An employee checks the draft and accepts it. Measurements and quantity stay manual, because those values are too critical for inventory processes.

What this means for your company

If you hand the development of your software to AI agents, ask about the three checks. Which checking programs run on every change, and which on a schedule? Who reviews the code without having written it? Who approves which exact version before it goes live? For every limit, also ask whether it sits in the access or only in the instruction.

We set up these checks with you, for your software and in your company's accounts. Who approves which version is agreed beforehand. Our article on quality control for AI work shows how the checks apply to other work too. Our offer shows what AI can take over in your company.

Book a free AI assessment

Inquiries