A2A SDK for Python 1.1
Last reviewed Oct 28, 2026
Prompt Details
Prompt Composition
2prompts
- Python 3155 lines · 3.8K tokens
- A2A SDK for Python 1.165 lines · 3.4K tokens
Total220 lines · 7.2K tokens
CWE Coverage
- 20
- 23
- 36
- 59
- 73
- 78
- 79
- 89
- 95
- 117
- 201
- 208
- 209
- 214
- 250
- 295
- 306
- 312
- 319
- 328
- 338
- 347
- 367
- 379
- 409
- 416
- 426
- 427
- 470
- 488
- 502
- 532
- 611
- 639
- 674
- 694
- 732
- 770
- 772
- 776
- 807
- 829
- 841
- 862
- 916
- 918
- 1104
- 1333
- 1395
- 1426
- 1427
Prompt Preview
Apply the Python 3 prompt first. These rules cover the a2a-sdk 1.1 line, checked against 1.1.3, on maintained Python 3.10–3.14 releases, its A2A 1.0 protobuf APIs, and explicitly enabled v0.3 compatibility bindings.
Agent discovery and transports
- Apply the Python outbound-network controls to
A2ACardResolverandClientFactory.create_from_url: allowlist HTTPS destinations and constrain card paths, redirects, DNS results, deadlines, and response bytes before parsing. Keepresolver_http_kwargsunder application control; the resolver reads the response body before constructing the card. - Validate each
AgentCard.supported_interfacesentry'surl,protocol_binding,protocol_version, andtenantbeforeClientFactory.create. SetClientConfig.supported_protocol_bindingsexplicitly and register only reviewed transport producers; a supported binding or signed card does not authorize its destination or a protocol downgrade. - Pass an explicit
signature_verifierwherever signed-card trust is required; verification is optional in the SDK. Withcreate_signature_verifier, bind trusted keys to the expected agent and fix the allowed algorithms. Treat the suppliedkidandjkuas untrusted selectors; never let them choose an arbitrary key or key-fetch destination. - Verify cards supplied directly to
ClientFactory.createorcreate_client(AgentCard)before use. Pass a verifier separately toget_extended_agent_card; initial discovery verification is not a persistent policy for subsequent card retrievals. - Supply a reviewed