Chapter 2
Building AI agents: Finding and preempting vulnerabilities
Security risk does not begin at deployment. It is introduced much earlier, during development, integration, and testing. As organizations embed AI into business processes, the nature of application risk is changing in ways traditional controls were not designed to address.
AI agents introduce new vulnerability classes that extend beyond conventional code flaws. Prompt manipulation can subtly alter system behavior. Data poisoning can compromise outputs and decision-making. Insecure integrations can create unintended access paths into sensitive systems. In fact, 58% of the surveyed organizations reported that minimizing prompt and input risks is difficult, underscoring how unprepared many environments remain for AI-specific threats.3
AI systems rarely operate in isolation. They rely on models, plug-ins, APIs, and external data sources, expanding the software supply chain. Each dependency introduces potential exposure. A compromised integration or a model trained on tainted data can propagate risk directly into production environments.
3 Ponemon Institute, Managing Risks and Optimizing the Value of AI, GenAI & Agentic AI, March 2026.
How AI development accelerates risk
At the same time, AI is accelerating development. Generative tools are producing code at unprecedented speed, improving productivity while introducing vulnerabilities at machine scale if outputs are not validated. Insecure libraries, flawed authentication logic, and improper input handling can move from generation to production rapidly without appropriate review.
Consider a retail organization deploying an AI‑powered customer service agent. Without rigorous input validation and testing, attackers could manipulate prompts to extract sensitive customer information or influence back-end order processing. What appears to be a simple conversational interface can become an entry point into core enterprise systems.
Similarly, a financial services chatbot integrated with account platforms must be resilient against prompt injection attempts that could expose account data or trigger unauthorized transactions. Addressing AI-specific vulnerabilities before deployment is essential to preserving trust in automated interactions.
Security practices are evolving accordingly. Testing now extends beyond traditional analysis to include prompt injection resilience, input and output validation, integration security, and supply chain oversight.
Organizations are validating training data sources, monitoring model behavior, and embedding controls directly into development pipelines.
By integrating automated scanning, dependency validation, and continuous testing early in the life cycle, organizations can identify vulnerabilities without slowing delivery. Embedding security into AI-enabled development from the outset reduces operational risk while enabling responsible innovation.
Preventing vulnerabilities before deployment does more than protect systems and data. It also strengthens confidence in the reliability, integrity, and resilience of AI-driven services that increasingly power the business.
Enterprises should treat AI development as a security-first discipline. Building AI agents securely requires embedding application security controls directly into the development life cycle rather than attempting to address risks after deployment.
Organizations should validate AI-generated code, test prompt interfaces and input and output handling, secure integrations with models and APIs, and continuously scan dependencies across the AI software supply chain. Security testing must extend beyond traditional code analysis to include AI-specific attack paths such as prompt injection and insecure model interactions.
By integrating automated security testing, dependency validation, and continuous security testing, enterprises can identify and remediate vulnerabilities early while maintaining development speed. This approach enables organizations to build and deploy AI agents with greater confidence, ensuring that new capabilities are delivered without introducing unnecessary risk.
Build AI securely with OpenText application security testing solutions.