
What Is an AI Agent Harness, and Can It Actually Keep an Agent Safe?
Your AI coding agent can read files, execute commands, modify code, and run tests. But how does it actually do all of that? And what prevents it from doing something dangerous? Meet the AI agent harness: the software that connects an AI model to its tools, manages its workflow, and turns its decisions into actions. In this episode of DevSec Station, Tanya Janca (SheHacksPurple) explains how AI agent harnesses work, what security controls they might provide, and why having a harness doesn't automatically make an AI agent secure. We'll explore: What an AI agent harness actually is, and how it connects AI models to tools and external systems. How harnesses manage tool calls, workflows, context, errors, and approvals. Agent harness vs. sandbox: Why they're not the same thing, and why that distinction matters. Where agent tools execute, and whose permissions they use. How file access, shell commands, path traversal, and symbolic links can create security problems. Why filtering dangerous commands isn't enough to secure arbitrary shell execution. What happens when the harness itself contains vulnerabilities or compromised dependencies. How least privilege, isolation, authorization, and properly enforced security boundaries can reduce risk. And one of my favourite reminders: Not every damn thing needs to be an AI agent! Sometimes a scheduled job, regular software, or a narrowly scoped AI feature is the safer and simpler solution. The big takeaway: The AI model might be making decisions, but the harness is often the software turning those decisions into actions. That makes it a critical part of your security architecture. 🔧 Your one thing to do this week: Pick one AI agent you're using and investigate one of its tools. Where does it execute? On your computer, inside a container, or on a remote server? Whose permissions does it use? And what actually restricts what that tool can do? You don't have to audit the entire harness. Just understand one tool and the environment where it runs. DevSec Station is a podcast by Tanya Janca (SheHacksPurple), focused on short, practical lessons that help software developers build more secure software. Train with Tanya: Want to bring practical, hands-on secure coding, application security, or AI security training to your team? Learn more at SheHacksPurple. Follow Tanya: https://newsletter.shehackspurple.ca https://linkedin.com/in/tanya-janca https://youtube.com/@shehackspurple https://shehackspurple.ca
- Transcript














