AI security starts with knowing which models, datasets, agents, skills, and tools a project uses.
2
Agents need narrow permissions, validated outputs, human approval for risky actions, and isolation from production systems.
3
AI-generated code and agent components need repeated security scans, developer review, and clear organizational guardrails.
Summary
Javier Garza presents a compressed training workshop on AI security. He begins with risks from the OWASP list for LLM applications, including prompt injection, sensitive information disclosure, supply chain vulnerabilities, excessive agency, and resource consumption. He demonstrates direct and indirect prompt injection with Gandalf challenges, then explains controls such as input sanitization, structured function calls, restricted database views, output validation, and human approval. The workshop then moves to AI bills of materials, which inventory models, datasets, agents, packages, and other components across repositories. Garza connects this inventory to threat modeling, using assets, data flows, trust boundaries, threat enumeration, and ongoing review. Later sections cover MCP servers and agent skills, separating scans for tool poisoning from scans for code vulnerabilities. He recommends a scan, fix, and rescan loop, secure prompts, development and production boundaries, dependency checks, hardened IDE settings, developer review, and governance that explains its restrictions. He closes with offensive agent workflows, training resources, certificates, and practice challenges.
Prompt injection exploits the gap between instructions and untrusted content
Garza describes prompt injection as manipulating an LLM directly or indirectly so it breaks its intended rules. In the Gandalf challenge, a user progressively extracts a secret password by getting the model to ignore its system prompt. Indirect injection can be hidden in external content, such as white text on a web page or a LinkedIn profile, where a person may not see the instruction but an LLM processing the page can. His suggested defenses include sanitizing input, using a strong system prompt, requiring approval for high-risk actions, constraining model behavior, and validating output formats so text returned by the system is not treated as a command.
Database views can limit what an agent is able to retrieve
Sensitive information disclosure happens when an LLM reveals private, confidential, or proprietary data. Garza gives the example of an assistant that should return names and phone numbers but should not expose home addresses. Rather than granting the agent access to an entire SQL database, he recommends creating a read-only view containing only the permitted fields. The agent then cannot write to the database and cannot retrieve information outside that view. He also warns against uploading enterprise repositories to services whose terms may allow submitted content to be used for training or disclosed to others.
Third-party AI components need the same scrutiny as ordinary code
Garza treats models, skills, MCP servers, libraries, and datasets as supply chain components. A skill may be a text file, but it can still contain malicious instructions or code. He describes a scan of more than 10,000 skills in which 367 contained some form of malware. His advice is to read or scan a skill before installation, verify its source, and rescan installed MCP servers because a later version may be compromised even when the original version was safe. He also warns that a model can hallucinate a dependency name, after which an attacker can create a malicious package under that name.
An AI bill of materials makes a changing system searchable
An AI bill of materials inventories the components used by AI applications. Garza contrasts it with a software bill of materials: an SBOM tracks libraries, packages, and dependencies, while an AI BOM also tracks models, datasets, agents, and pipelines. He demonstrates a CLI scan that produces a CycloneDX-style inventory and a dashboard that groups assets such as models, datasets, packages, and agents. The dashboard can report vulnerabilities and answer questions such as which models appear most often across monitored repositories. Garza argues that the inventory must be updated continuously because AI components and model behavior can change over time.
Threat modeling must account for probabilistic systems and new trust boundaries
Garza defines threat modeling as a structured process for identifying, analyzing, prioritizing, and mitigating threats during system design and its lifecycle. The work starts with architecture, assets, data flows, and trust boundaries, then moves through threat identification, mitigation, and repeated validation. AI systems add model files, prompt templates, system prompts, context windows, memory stores, and model endpoints to the assets that need protection. External content from a weather service, stock database, or web page cannot be trusted automatically because it may carry an indirect attack. Garza recommends using frameworks such as STRIDE or MITRE ATLAS and updating the model whenever the application changes.
MCP security requires both tool-level and code-level scans
Garza explains MCP as a protocol that lets agents connect to external APIs and real-time data. Its simple installation and publishing model also make malicious tools easy to distribute. Tool poisoning can hide instructions inside an MCP definition, such as a request to send API keys or cloud tokens to an attacker. Garza separates two checks: an agent scan examines installed tools for prompt injection, tool poisoning, toxic flows, and related behavior, while a code scan examines the MCP implementation for issues such as path traversal, command injection, and SQL injection. He recommends scanning before first use and applying the same review standards used for other software.
Generated code needs an automated scan, fix, and rescan loop
Garza says AI coding tools can produce functional code that is insecure by default. He recommends adding agent rules or hooks that run a security scan after code generation. If the scan finds a vulnerability, the agent can fix the code or generate a replacement, then scan again until the result passes. This process applies to MCP code and ordinary application code. He also recommends structured prompts that request security practices such as rate limiting and parameterized queries, plus functional and integration tests and documentation. The central control is repeated verification rather than trusting the first generated result.
Security controls fail when people do not understand their purpose
Garza argues that organizations need both technical restrictions and developer education. A company can disable automatic approval, prevent destructive actions, and publish an AI coding policy, but developers may create workarounds if the restrictions only block their work. He recommends explaining that guardrails prevent actions such as deleting files, sending data outside the company, or mass-mailing contacts. He also advises keeping agents away from production, using development and staging environments, requiring approval for deployments and destructive operations, and asking a developer to review code before publication. His view is that people will use AI tools, so governance has to work with that behavior.