Skip to main content

↑↓ Navigate · ↵ OpenESC Close
Omotayo Aina

Language

Interface only. Articles and project write-ups stay in English.

Theme
DEV.TO · GDEAgentic AI10 min read

Google ADK Security: Five Layers That Defend AI Agents From Prompt Injection

DEV Community Google Developer Experts cover banner featuring Omotayo Aina on Google ADK agent security
dev.to/gdeDEV.to (syndicated publication, opens in a new tab)

Indirect prompt injection through tool responses sits at the top of the OWASP Top 10 for LLM Applications. A single compromised tool payload can trick an autonomous agent into issuing unauthorized actions unless security is built into the execution framework from day one.

Five Security Layers in Google ADK

  • Identity and Authorization: Bind every tool execution to explicit caller identity and least-privilege scopes so the model cannot escalate permissions.
  • Content Safety Guardrails: Screen inputs and tool outputs using deterministic checks and Gemini-as-Judge plugins via after_tool_callback.
  • Sandboxed Execution: Isolate code execution and file access inside ephemeral boundaries away from host credentials.
  • Evaluation and Tracing: Record deterministic telemetry across every agent handoff and tool invocation to audit anomalous behavior.
  • Network Controls: Restrict outbound egress to approved endpoints so compromised prompts cannot exfiltrate sensitive payloads.

Runner-Level Security Plugins and Governance

Registering a security plugin at the runner level enforces uniform policy across every agent and subagent without relying on individual prompt authors. Reader feedback on this architecture surfaced an auditability gap in recording why a security decision occurred, which I filed upstream as google/adk-python#6099 proposing a security decision ledger plugin.

Companion Video and Original Post

Watch the Google Cloud Next Creator Studios DevByte on YouTube or read the original walkthrough on DEV Community (GDE).