AI-Built Software, Part 4 of 7: The security and operational work coding tools don’t do unless you ask, and the questions an owner should be asking.

In part 3 of this series I covered agentic coding, and I made the claim that “the code is the easy part”. Agentic coding tools will build an app for you extremely quickly if you give them a good specification document, but every app that runs part of a business or handles confidential information needs expertise applied to security and operational factors. The tools may build some or none of this unless specifically prompted to, and the person using agentic coding to build apps may not even realize that these areas need careful scrutiny.

For experienced developers, none of this is new. These are the obligations every IT department putting apps into production account for as part of their production deployments. But what has changed is that people without that expertise are now shipping software, and are doing so on a schedule that is very compressed compared to traditional code deployments. So, the question we keep coming back to throughout this series (can the person responsible for the app read and understand what was written, and do they) widens here: In your AI-developed apps, has anyone taken a hard look at security and operations, or does anyone even know those areas need attention?

In this article I’m going to cover these security and operational considerations. I’m not going to go into detail; each of these sections could be a full article on its own. To make this real, I’ll give some real examples based on a budgeting app for Canadian families that I recently built for its founder. This app handles customers, money, and personal information, so every single security and operational consideration I’m covering was a must-have, not a nicety.

The great part about this? The same tools that wrote the code also built every item below, although not until I specifically asked them to. And each area still required expertise - expertise to know what to ask for, how to understand and audit the results, and when to push back. If you’re using agentic AI to build apps, you don’t need to know the answers, but you do need to know the questions.

Inside the App

When you’re building an app, whether using AI or not, security must be designed in from the ground up rather than bolted on later in an ad hoc fashion. It’s not impossible to address security concerns once the app is built, but it isn’t a good approach - security that is added after the fact has a way of breaking.

Here are the most important areas, each with a basic question you should consider.

Access to resources. A login page that authenticates users is not all the security your app needs. Once someone has logged in and is authenticated, how is their access controlled? Every screen access, every user action, and every data access within the app must be validated against the user’s security permissions, no matter how those actions are initiated. The question: Can users reach areas they shouldn’t by changing the address in their browser, or by guessing an ID?

Records and audit logs. At a minimum, all record create/update/delete actions should be logged immutably (i.e., in a way that they cannot be altered). In some apps, even data access should be logged. In part 2 of this series, I referenced an app (built on a “prompt-to-app” platform) whose supposedly immutable records could in fact be edited by bypassing the forms. In the budgeting app, in-app subscription records are correlated to real payments made on Stripe, so a complete audit log is critical for resolving any disputes that might arise. The question: Can I see every change, and can anyone change or delete those audit logs?

Separation of data. If an app was built for one person, and will always remain that way, this might not be a concern. But for any app with multiple users, the visibility of data needs to be restricted to those who are explicitly permitted to see it. In the budgeting app, one household must never be able to see another household’s financial data. Those kinds of restrictions need to be enforced on the server at the points the data is accessed, not just via restrictions in what the screens choose to show. There are also legislative and regulatory concerns associated with data; that’s covered in part 5 of this series. The question: How do we know one customer cannot see another, even if they maliciously bypass our forms and make direct calls to our server?

Encryption. Encrypting your app’s data is an insurance policy. It adds a layer of protection in the event someone bypasses your security, either within the app itself or on your server. Note that I’m not saying that implementing encryption solves all security challenges, because there are cases where your encryption key itself can be compromised. However, it’s another layer of protection that helps secure your app. In the budgeting app, encryption is applied at more than one layer, covering both the sensitive data and the backups, and the keys live outside the code and are protected separately. I believe that’s the right approach for most apps, because relying on a single layer leaves a gap. The question: Is encryption being used where warranted, where are the encryption keys, and are the backups as protected as the database itself?

Strong APIs. Every endpoint that the screens call is an endpoint anyone on the internet can call, passing in whatever data they like. It is imperative that every endpoint is authenticated, authorized, validated on the server, and rate limited. The question: what happens if someone calls your endpoints, crafting custom requests that bypass your app’s controls completely?

If you can’t confidently speak about the right way to implement each of the areas above in your code, I recommend that you strongly consider an external review of your app. This is a case-by-case call (and it is going to cost you some money) but if the stakes warrant it, it is money well spent.

Operations: Boring but Important

Operations covers how you manage, control, monitor, and upgrade the app once it has been deployed. This is often the part that people really don’t like: It’s not exciting, it can be a lot of repetitive work (especially if not automated), and it’s easy to skip without seeing an immediate impact. But it is critical - it is what keeps the app secure, reliable, and performant. As before, I’ll give you a basic question to think about for each area.

Three environments. Over the years, developers have settled on a model for deploying apps. Three environments is standard: One for development, one for staging app releases, and one for production. Development is where the code is generated and tested; for agentic coding that might be on your computer or in the cloud. Staging is a setup that mirrors production’s configuration, used for full testing before anything is put into production. Question: Before releasing new code to users, where was this tested, and did that server look exactly like production?

The server. Bad actors are running scanners that constantly probe servers. Every time I start up a new server I immediately see (without exaggeration) hundreds of automated probes hitting the server, looking for a way in. Every publicly accessible server must be properly and intentionally configured, including the firewall and web server. The operating system must be hardened (a topic all to itself), and a process for regular patching (preferably automated) must be in place. All access must be via secure keys and not passwords. These are table stakes for running a server, and getting it wrong has real implications. The question: Who configured the firewall and hardened the operating system, and when was it last patched?

Certificates. Every website requires a certificate, and certificates need to be renewed regularly. It’s pretty simple to automatically renew certificates, but it still gets missed by people who don’t know that it needs to be done. Your server must have automated renewal and an alert before expiry. The question: when does your certificate expire, and how is it renewed?

External integrations. Many apps use external integrations. A very common use case is for payments, where a company like Stripe acts as the payment provider, ensuring that card data never touches your server. The real work is properly configuring the external provider and building a “sandbox” to test against. It’s easy to configure these platforms to handle a standard payment, but the special cases are easily missed. For example, a refund issued inside Stripe must reach the app so the app knows to end the customer’s plan, or the customer keeps free access after their money has gone back to them. These special cases are not handled by default, and because they deal with real money, they can come back to bite you. A real refund request exposed exactly this gap in the budgeting app, and the fix was built, documented, and deployed the same day. There are other obligations around paid subscriptions (PCI, and Ontario’s rules on subscriptions and cancellation), which I’ll cover in part 5. The question: When your payment provider does something on its own (a refund, a failed renewal, a disputed charge), does your app find out, and what does it do about it?

Monitoring. Silence is not health. If you aren’t actively monitoring your production server, you won’t know that the app is having problems until a customer contacts you. When I say “actively monitoring”, I mean automated monitoring of your server, because it just isn’t realistic to monitor servers any other way. I use an app I developed (Watchtower) to monitor all my websites, apps, and servers. Because I specifically built Watchtower for the development platform I use (Laravel), it has deep hooks into my apps. For instance, for the budgeting app it actively monitors over 50 metrics including uptime, response time, certificate expiry, the database, queues, failed jobs, exceptions, pending security updates, backups, and the application logs. When a potential issue arises, I am alerted immediately. That has already paid for itself: Watchtower flagged a problem building in the application logs, and I addressed it before any customer was affected. The question: When your app has a problem or is degraded, are you the first to know?

Backups. Backups need to be done, verified, tested, and moved off-site. That means you need scheduled jobs that do the encrypted backup, confirm it is valid, archive older backups, and move the encrypted backup to a secure remote server.

A lesson many people have learned to their dismay is that backups are no good if you can’t restore them. Your backup regime must include regular disaster recovery tests where you restore the entire app (using a recent backup) onto a different machine. Write the regime down: frequency, retention, and the disaster recovery testing schedule. For the budgeting app, that documentation lives in the maintenance agreement: daily encrypted backups kept for at least 30 days, a tested restore twice a year, and a log of those tests. The question: When did you last restore the app on a completely different server?

Those are the big areas, but there are many other operational considerations. The deployment should have enough automation that it can be repeated under pressure or by somebody else; logs must be kept and rotated; server configurations must be documented, not just at roll-out but also as changes are made; secrets should be stored in a vault, not a text file; framework and package updates need to happen on a cadence (several of this year’s worst breaches ran through compromised developer tools); keys and accounts must be revoked when someone leaves; and somebody has to be named as the person who receives the alerts, even if the answer is “next business morning”.

Documentation: Could Someone Else Take It Over?

Here’s the question that ties everything together. If the server died tonight, or was taken offline because a provider failed, could someone else rebuild it and get it up and running again with minimal downtime?

The rule that I’ve followed over many years is this: A system that cannot be handed over to someone else is not ready for production. That was true for the large enterprise systems I managed, but it’s just as true for a small app. For the budgeting app, I built two layers of documentation.

The first layer is for the owner, written in non-technical language. It includes an administrator’s guide that walks screen by screen through the admin portal (helping a family, refunds, requests for the data held about someone, deleting an account, editing content, the settings including the action history and the breach register). It opens with one overarching principle (that no screen ever shows a family’s budget) and closes with “things I do for you” and “things that happen on their own.” Alongside this, there is also an app guide for the family-facing screens (including a detailed list of each release), a Stripe document for the decisions only the owner can make, and a go-live checklist recording each setting and why it was chosen.

The second layer is operational runbooks: start here (what the system is, how it fits together, the accounts and services, the scheduled jobs); deploying and building a new production server; backups and restoring, with the restore-test log; routine care (monitoring, patching, certificates, dependencies); and when something’s wrong (where to look first, common failures, what to do if personal information may have been exposed, who to call).

A common failure with documentation is that it is created but doesn’t get updated as changes are made. To prevent this, I keep the documentation in the same repository as the code, and one of the mandatory commit rules ensures that the documentation is updated as part of the same commit as the feature. When the refund gap I described above was fixed, the owner’s guide had its new Refunds section before the code reached production.

The tools are good at writing all of this from the code when asked. The problem arises when nobody asks, and the agents don’t offer.

Closing

If you’re building an internal tool for a dozen staff that replaces a spreadsheet, you don’t need most of this list. What you do need is to know which parts you’re skipping and why, because small tools have a way of growing into systems the business depends on.

With that in mind, here’s one final question to consider: If your app was compromised, or suddenly went completely offline, how would you know, how would you get it back, and could anyone but the person who built it do that?

In the next part, I’ll look at functionality these tools build that legislation already has a strong opinion about: email without consent and personal information collected without a reason.