AI Is Building Your Attack Surface. Are You Testing It?
Summary
AI-generated code and AI agents are rapidly expanding enterprise attack surfaces, outpacing traditional security validation methods. Research using BaxBench revealed that 62% of LLM-generated backend code was either broken or insecure, with half of the functional code remaining exploitable. Concurrently, AI agents are creating a second, unmapped attack surface by autonomously invoking APIs, often privileged and undocumented; Gartner predicts AI agents will be the primary consumers of enterprise APIs by 2028, with over 50% of successful attacks on agents by 2029 exploiting access control failures like BOLA/IDOR. The CVE-2025-12420 (BodySnatcher) incident exemplified this, showing an unauthenticated attacker could exploit an AI agent to gain ServiceNow admin access. This rapid delivery speed necessitates a fundamental shift to AI-powered dynamic testing, correlated with static analysis, to identify and prioritize real exploitability amidst increased alert noise.
Key takeaway
For MLOps Engineers and AI Security Engineers deploying AI-generated services, your existing security tools are insufficient for the speed and complexity of new attack surfaces. You must integrate AI-powered dynamic application security testing (DAST) that actively probes AI-generated code and agent-invoked APIs at runtime. Correlate these dynamic findings with static analysis to identify true exploitability, reduce alert fatigue, and enable your teams to ship AI-driven applications faster and with confidence.
Key insights
AI-driven development creates new, amplified attack surfaces requiring advanced, correlated dynamic security testing.
Principles
- AI-generated code is often exploitable.
- AI agents amplify traditional API flaws.
- Validation must match AI delivery speed.
Method
Implement AI-powered dynamic testing, correlating static and dynamic findings to identify real exploitability and prioritize high-confidence fixes for AI-generated code and agent-invoked APIs.
In practice
- Deploy LLM-powered SAST in IDE/pipeline.
- Use intelligent DAST for BOLA/IDOR validation.
- Correlate static and dynamic findings.
Topics
- AI Security
- Dynamic Application Security Testing
- API Security
- AI Agents
- LLM-generated Code
- Attack Surface Management
Best for: CTO, VP of Engineering/Data, Director of AI/ML, AI Security Engineer, MLOps Engineer, Software Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Blog RSS Feed | Snyk.