Every team shipping AI starts with the same assumption: keep a human in the loop and you’re covered. We think the assumption has a crack. As platforms moved toward autonomous behavior, the loop became a spectator sport. A reviewer who checks 10 outputs a day can read closely and push back. A reviewer facing 100,000 approves whatever arrives.
The failure modes are familiar: rubber-stamping, alert fatigue, model drift nobody notices and AI systems making decisions faster than humans can review. Reviewing that cannot keep up is not a safeguard.
Our position is simple: AI-assisted attacks require AI-assisted defenses. Human oversight is essential, but it cannot be your only control. The response needs to be organized around four priorities: know what can go wrong, control what AI can do, secure where AI runs and break it before attackers do.
How the loop changed
Each era of AI moves the human further from the action, and the attack surface moves with it.
Era | Human role | Attack surface |
Web application | Human in command | Application layer |
Generative AI | Human in the loop | Application layer plus AI inputs |
Agentic AI | Human on the loop | Application layer plus AI reasoning chain |
Autonomous | Human out of the loop | Application layer plus AI policy layer |
In the first two eras, people interpret the output and make the call. In the agentic era, they approve or reject what an agent proposes. In the autonomous era, they set policy and review outcomes weekly or monthly. At each step, AI's involvement grows, accountability shifts and the attack surface widens. These stages overlap, and one organization may run different tasks at different levels of autonomy.
Know what can go wrong
The OWASP Top 10 evolves with the threat landscape. The web application list covers risks such as injection and broken access control. The list for LLM applications added prompt injection, data poisoning and unbounded consumption. Agents add risks such as goal hijacking, rogue agents and poisoned memory. OWASP's risk lists for LLM and agentic applications catalog them. Existing web controls stay necessary, but they no longer cover every threat.
Keep STRIDE, but don't stop there. Add MITRE ATLAS for adversarial techniques against AI systems and MAESTRO for the layers of an agentic architecture. For autonomous agents, pay particular attention to how little direct human oversight remains.
Make threat modeling continuous. Workshops that take weeks and then gather dust cannot keep pace with systems that keep changing. Let AI draft the data-flow diagram, candidate threats and a risk register from your architecture documents. Then have experts review it, and update it whenever a feature changes.
Control what AI can do
Governance that lives in a policy document is already out of date. ISO 27001 and SOC 2 still apply, and ISO/IEC 42001 and the NIST AI Risk Management Framework cover what AI adds. Start with an inventory of your AI assets, risk and impact assessments, and a record of where each system's data came from. Centralize the inventory across your CI/CD pipelines so an automated control can quarantine a model with a serious flaw. Make it searchable, so a new vulnerability points to every affected product without emailing each team. Automate audit evidence, and retire models and components with expired licenses or unacceptable vulnerabilities.
Guardrails come next: telling an LLM "don't reveal credit card numbers" is a wish, not a control. You need controls outside the model's instructions. Use three patterns together. Deterministic rules catch known formats. Policy-based prompts steer the model's behavior. A dedicated LLM-based guardrail, such as Meta's Llama Guard, classifies prompts for safety. Then place them across the application. Input guardrails screen requests for sensitive data, off-topic asks and jailbreak attempts. Output guardrails stop policy violations and exposed secrets before the user sees them. Dialogue guardrails keep a chatbot in its role, so an HR bot does not start giving financial advice. Retrieval guardrails inspect what a retrieval-augmented generation (RAG) system pulls in, because retrieved passages can be malicious or carry instructions meant to manipulate the model.
Give anything autonomous a kill switch. If an agent goes rogue, you need to intervene immediately.
Coding assistants deserve the same scrutiny. Generated infrastructure code reflects the context the assistant has, not your security policy. At Thoughtworks, we built a reusable skill that captures cloud security best practices and the misconfigurations to avoid. It starts with Terraform, and we plan to extend it to Kubernetes. The results have been promising in our experience, but review AI-generated infrastructure code anyway.
Secure where AI runs
AI security sits on top of cloud security, not in place of it. Models, applications and data live in that infrastructure, so guardrails have to reach virtual machines, data stores and Kubernetes clusters. For managed AI services, use approved models, enforce access controls and choose short-lived credentials over long-lived API keys. A compromised key that stays valid for an extended period creates needless exposure.
Scope agent permissions tightly. Don't hand an agent broad authority because its normal task is harmless, and add safeguards around destructive actions. Apply identity and access management, network isolation, monitoring and logging to the environments where your AI workloads run.
Break it before attackers do
Traditional pen testing is a point-in-time exercise: testers run scanners, try to exploit what turns up and hand over a report at the end. That finds familiar web flaws, but many conventional tools cannot adequately test LLM and agent behavior, and the report starts going stale the day the system changes.
Make the testing continuous. Automated testing agents can probe your systems regularly, including for emerging attacks, and alert your team to what they find. Test systems as they change. A point-in-time assessment does not stay valid.
See it in action
We built a demo on an Ollama model with documents prepared to reproduce attacks from OWASP's top 10 LLM risks. For instance, the demo app had one document carrying a malicious instruction disguised as a system note, telling the model to declare unlimited leave for all employees. Another document holds simulated administrator credentials and API keys.
Without guardrails, the model follows the injected note and states the attacker's policy, then hands over the credentials. With guardrails on, both requests are blocked. The lesson: ordinary-looking reference material can redirect a model. Guardrails help, but they do not replace the other layers or ongoing testing.
Evolve the security mindset
Human review is not worthless. It is misplaced when it is the only control. Three changes are landing at once. Agents are gaining autonomy and can reach data and act in production. Humans approve fewer individual actions. Attackers use AI to raise the speed and scale of their attacks. AI-assisted attacks require AI-assisted defences.
Also, we come back to four priorities: know what can go wrong, control what AI can do, secure where AI runs and break it before attackers do. Build AI security into design, development, deployment and operation. As agents become more autonomous, the defenses protecting them have to become more adaptive too. Human-in-the-loop, on its own, is not enough.
Disclaimer: The statements and opinions expressed in this article are those of the author(s) and do not necessarily reflect the positions of Thoughtworks.