Google ADK for Go 2.3.0

Last reviewed Sep 19, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Go 1.27130 lines · 5.5K tokens
  2. Google ADK for Go 2.3.090 lines · 3.4K tokens
Total220 lines · 8.9K tokens

CWE Coverage

  • 15
  • 20
  • 22
  • 59
  • 78
  • 79
  • 89
  • 94
  • 117
  • 190
  • 201
  • 208
  • 209
  • 250
  • 252
  • 257
  • 287
  • 295
  • 307
  • 323
  • 327
  • 338
  • 345
  • 347
  • 352
  • 362
  • 367
  • 378
  • 426
  • 444
  • 488
  • 489
  • 494
  • 532
  • 639
  • 732
  • 759
  • 770
  • 772
  • 807
  • 841
  • 862
  • 863
  • 915
  • 916
  • 918
  • 922
  • 942
  • 1004
  • 1275
  • 1395
  • 1426
  • 1427

Prompt Preview

Apply the Go 1.27 baseline first. These rules target google.golang.org/adk/v2 v2.3.0 on Go 1.27; the module requires Go 1.26.6 or newer.

Agent configuration and instruction boundaries

  • Build llmagent.Config models, instructions, tools, toolsets, subagents, and generation settings from trusted configuration; treat tool descriptions and retrieved content as untrusted inputs to model decisions.
  • Keep untrusted state and artifact text out of authoritative Instruction and GlobalInstruction templates: {key} and {artifact.name} substitute their contents. Use InstructionProvider for literal braces, and validate any values the provider inserts.
  • Put shared instructions on the root agent; only its GlobalInstruction takes effect. Review instruction providers because they override the corresponding static instructions, and keep authorization independent of all instruction text.
  • Minimize Tools, Toolsets, and SubAgents, and set DisallowTransferToParent and DisallowTransferToPeers when those routes are unnecessary; transfer restrictions do not authorize access to the destination's resources.
  • Validate structured agent output before using it for privileged operations; OutputSchema still permits tool calls through set_model_response, and OutputKey stores model-produced data rather than trusted policy.

Tool execution and callback coverage

  • Use typed functiontool.New arguments and explicit schema bounds, then check business constraints and current principal, tenant, resource, and operation inside the handler; schema validation does not grant