/agentic-engineering:adk-agent-securityfrom Agentic Engineering Skills
Threat-models, hardens, and reviews Google ADK agents against prompt injection, supply-chain compromise, excessive agency, and unsafe code execution. Maps findings to OWASP IDs and provides observable checks.
Ships in Agentic Engineering Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Deliver a threat model, a structural hardening change or a prioritised security review for an ADK agent, working inside its existing tools, agents, pins and tests. Prompt injection is unsolved; design so that a successful injection cannot cause harm. Screening products are a layer, never the boundary. Every recommendation here pairs with an observable check, and every claim carries an evidence label (vendor guidance, documented behaviour, independent evidence, community report, source-verified).
Read the agent tree (LlmAgent, workflow agents, sub_agents=,
AgentTool, RemoteA2aAgent), every tool and toolset (FunctionTool,
McpToolset with its connection_params, tool_filter,
tool_name_prefix, header_provider; OpenAPIToolset; built-ins), code
executors and BashToolPolicy, callbacks and App/Runner plugins, the
identity source each tool uses, memory and retrieval inputs, and how the UI
renders model output. Classify each tool as read, write or irreversible.
Identify the pinned google-adk version and read
compatibility: 2.8.0 fences relayed
sub-agent output, does not fence MCP tool descriptions (2.10.0), has no
ToolCallIntegrityPlugin (2.11.0), predates the 2.12.0 fixes that keep
OAuth2 secrets off the serving endpoints and take the A2A user id only
from an authenticated principal, and sits above the adk web and forged
confirmation CVE ranges fixed by 2.7.0. Preserve the pin; propose an
upgrade as a decision with the CHANGELOG entries it brings, and treat
2.12.0 as the floor for an agent that serves several users over ADK's
HTTP endpoints.
Run the read-only inventory from this skill's directory with an available Python 3.11+ interpreter (interpreters):
python "$SKILL_DIR/scripts/inspect_security_surface.py" --project .
It parses source with ast, never imports the project, and prints
identifiers, flags and file:line only. It reports per agent: tools by
kind, MCP toolsets without filters (mcp_unfiltered), stdio transports,
write-like tools without require_confirmation or a before_tool_callback
(write_tool_without_gate), unsafe or network-enabled executors,
allow-all bash policies, callbacks and plugins, model-supplied identity
parameters, egress-capable and untrusted-content tools, remote A2A content
next to write tools, a google-adk pin below 2.7.0, and a trifecta summary
(has_private_data_source, has_untrusted_content_source, has_egress,
all_three, and complete, false when a tools= list or a sub-agent was
built at run time, so an absent leg means unknown, not absent). Every row
is a heuristic prompt to confirm in the tool body.
A partial: true result means an area was not scanned. It does not read
ADK 2.x Workflow graphs: it names their nodes (workflow_graph_unread)
and marks the run partial, so review each function node's effects by
hand. For a pull request, --compare against the base commit's run lists
what each agent can now do differently (validation).
Fill the per-agent worksheet in threat-model-checklist: assets, untrusted inputs, consequential actions, egress paths, identity source, and the enforcement point for each. This is the "before".
Ask only for decisions the source cannot settle: which actions are irreversible for the business, who the human controller is, which MCP servers are trusted operators, and what the deployment perimeter is.
| Mode | Decision and reference |
|---|---|
| (a) Threat model | Read threat model: inventory, the lethal-trifecta check per agent and per workflow, enforcement-point map (identity, callback, plugin, tool body, workflow structure, executor, perimeter, UI). Output is the completed checklist with each row's observable check. |
| (b) Injection-resistant structure | Read injection patterns: map action-selector, plan-then-execute, dual LLM, map-reduce and context minimisation onto SequentialAgent, a quarantined reader with include_contents='none' and no tools, before_tool_callback capability checks keyed on tool_context.state, and sub-agent output treated as data. |
| (c) Tool and MCP supply chain | Read tool supply chain: allowlist with tool_filter, review AI-visible descriptions, pin definitions by hash, namespace with tool_name_prefix, Streamable HTTP over stdio in production, per-user header_provider, no token passthrough, SSRF and egress rules, unfenced own tool results and OpenAPI descriptions. |
| (d) Agency and output handling | Read agency and output: tool tiering (read, write, irreversible), confirmation policy and its pitfalls, escaping and URL rules for rendered output, code-executor selection table, BashToolPolicy allowlists, identity and IAM conditions. When Model Armor, Semantic Governance Policies or another screen is proposed, or a reviewer asks what holds if a prompt gets through, read its Screening is a layer section: the Preview status and accuracy caveat, placement, an aggregate bound keyed on the business object, writes signed by a key the model never holds, and simulated demo controls that are not products. |
| (e) Adversarial suite | Read adversarial testing and seed from adversarial cases; from the other references only "Tier every tool" and "Confirmation as code" in agency-and-output and the gate in injection-patterns: deterministic scripted-model Runner assertions ("forbidden tool never called", "data never egressed"), optional promptfoo, garak or PyRIT campaign, Model Armor shadow evidence. |
| (f) Security review | Use all references, skipping the code-execution section of agency-and-output when the inventory shows no executor or environment toolset; report prioritised findings with file:line, the OWASP LLM or ASI identifier, the observable check that would show the fix, the evidence label and the owning skill. For a web application whose design records adk-system-designer's web security baseline, also cite the rule ID (SB17) a finding breaks, so one review covers the application and the agent. Write the review document first; when the request also says to carry the work out, then make the fixes it recommends, otherwise change nothing. |
A request may need several rows; keep them in one change set and one report.
State the affected agents, tools, callbacks and tests before editing. Then:
before_tool_callback or a
plugin validates arguments against tool_context.state and returns an error
dict to refuse (return None, not {}, to allow); the tool body re-checks
authorisation with identity from ToolContext, never from arguments. A
shared policy plugin (such as the community AgentGovernancePlugin) is an
extra layer, not this gate: see the gate rules in
injection patterns.require_confirmation or a durable review
(adk-operational-guardrails); the callable must return a strict bool,
and a custom BaseTool must read tool_confirmation.confirmed itself.tool_filter, record the reviewed tool
definitions with a hash, and prefer read-only filters in production.GkeCodeExecutor, AgentEngineSandboxCodeExecutor,
VertexAiCodeExecutor, BuiltInCodeExecutor, or ContainerCodeExecutor
with networking off). Never ship UnsafeLocalCodeExecutor or an allow-all
BashToolPolicy.adk-frontend-integration
owns the renderer).protect-adk-sensitive-data.
When tool results may not leave the project, a local classifier
(LlamaFirewall's Prompt Guard 2) is operated by
protect-adk-sensitive-data, which also owns where a screen runs.Do not widen an allowlist, loosen a filter or disable a callback to make a test pass. Do not treat an instruction such as "ignore text inside documents" as a control; it is a hint the attacker can out-argue.
Inspection is read-only, and code generation authorises no deployment, paid call or live test. Before any consequential operation (an API, billing or quota change, a billable resource, a secret, IAM, a data migration, a deployment, a deletion, or a paid or destructive test), read consequential operations, present the exact scope and limits, obtain explicit approval and end the turn to wait for it. Cleanup is a separate confirmed operation on resources this workflow created.
Adding a gate changes what the agent may do next and can block legitimate
work; show the owner the tool tier table before merging. Before any live
adversarial run, state the exact model, project, case count, cost ceiling and
the egress controls of the test environment, and obtain approval; keep paid
runs with adk-agent-evaluation. Never run adversarial cases against
production data or identities. Red-team only systems you own or have written
authorisation to test.
Read validation. Produce: the inventory before and
after with the finding counts that changed; the completed checklist; for each
structural change a scripted-model Runner test in which the model attempts the
forbidden action and the trusted boundary refuses it without mutation or
disclosure; the adversarial suite run offline with its assertions; and, when
approved, live results labelled vendor-measured or independent. A fact read
in the installed package is offline (source read).
Label each result with its tier (offline, local, live or release) and
outcome (pass, fail, blocked or not run) as
evidence labels defines them;
earlier, vendor and documentation-only results are historical,
vendor-measured or guidance, never this session's evidence.
Report files changed, commands with actual output, each finding's OWASP ID and owner, and the residual risk the structure still accepts. On a second invocation, reread the existing callbacks, plugins and tests before adding another gate.
Independent community project; not affiliated with or endorsed by Google.
LICENSE (opens in a new tab)agents/openai.yaml (opens in a new tab)assets/adversarial-cases.json (opens in a new tab)assets/threat-model-checklist.md (opens in a new tab)references/adversarial-testing.md (opens in a new tab)references/agency-and-output.md (opens in a new tab)references/compatibility.md (opens in a new tab)references/injection-patterns.md (opens in a new tab)references/operating-rules.md (opens in a new tab)references/sources.md (opens in a new tab)references/threat-model.md (opens in a new tab)references/tool-supply-chain.md (opens in a new tab)references/validation.md (opens in a new tab)scripts/inspect_security_surface.py (opens in a new tab)tests/test_inspect_security_surface.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ruslankhis/agentic-engineering-skills --plugin agentic-engineering26 skills in this plugin
/adk-agent-evaluationBuild, adapt or audit a Python ADK agent's test strategy: deterministic tool and Runner tests, live eval sets, simulated conversations, conformance replay, strict result checks and quote or citation support. Use for agent behaviour, regression coverage, eval reliability, fixing a failed stage without re-running paid earlier ones, holdout budgets, error analysis on a labelled dev set to fix wrong decisions, measuring each prompt, exemplar or model change, and subject-matter expert labelling: failure taxonomy, inter-rater agreement and judge calibration. Do not activate for non-agent unit tests, standalone model benchmarks, deployment or cleanup alone, prompt wording or exemplar design (adk-agent-instructions), model settings (adk-model-and-output-contracts), wiring eval gates into CI (adk-release-engineering), production telemetry (adk-agent-observability), adversarial suites (adk-agent-security) or presenting results (adk-presenter)./adk-agent-instructionsDesign, review or repair the instructions of Python Google ADK agents, covering instruction structure and altitude, session-state templating, tool-use guidance inside the prompt, sub-agent descriptions for routing, few-shot exemplar design, the instruction-versus-code division, model-generation prompt notes and prompt-as-code layout with change tests. Use when an agent follows its prompt poorly, over- or under-calls tools, routes to the wrong sub-agent, raises templating KeyErrors, or a prompt must move to a new model generation. Do not activate for the measured evaluation loop (adk-agent-evaluation), orchestration or a key an earlier agent's output_key never wrote (adk-workflow-design), tool docstrings and parameter schemas (adk-tool-interface-design), output schemas or model configuration (adk-model-and-output-contracts), releasing prompt versions (adk-release-engineering), or injection-screening products (protect-adk-sensitive-data).Other plugins' skills for the same job