A2A SDK for .NET 1.0.0-preview2
Last reviewed Sep 24, 2026
Prompt Details
Prompt Composition
2prompts
- C# 14106 lines · 4.4K tokens
- A2A SDK for .NET 1.0.0-preview273 lines · 3.8K tokens
Total179 lines · 8.2K tokens
CWE Coverage
- 20
- 22
- 59
- 78
- 79
- 89
- 94
- 117
- 190
- 201
- 208
- 209
- 214
- 257
- 287
- 288
- 295
- 323
- 327
- 338
- 347
- 352
- 362
- 367
- 378
- 426
- 502
- 524
- 532
- 611
- 639
- 674
- 759
- 770
- 772
- 775
- 798
- 807
- 841
- 862
- 863
- 915
- 916
- 918
- 922
- 942
- 1333
- 1395
- 1427
Prompt Preview
Apply the C# 14 prompt first. These rules cover A2A and A2A.AspNetCore 1.0.0-preview2 and their A2A v1.0 JSON-RPC and HTTP+JSON bindings. The packages contain net8.0 and net10.0 assets; use C# 14 on a supported, security-patched .NET 10 runtime.
Hosting and endpoint policy
- Configure ASP.NET Core authentication and authorization and apply
RequireAuthorizationto the builders returned by bothMapA2AandMapHttpA2A.AddA2AAgent<THandler>registers services without securing endpoints;AgentCard.SecuritySchemesandSecurityRequirementsonly describe policy. - Protect every RPC method and REST route, including
ListTasks,SubscribeToTask, cancel, push-configuration operations, andGetExtendedAgentCard. Keep method-specific permissions in anIA2ARequestHandlerwrapper shared by both bindings. - Publish only a minimal card through
MapWellKnownAgentCardand the separate REST/cardroute. Put sensitive capabilities behind an authorized extended-card implementation; the defaultA2AServerrejects that operation. Prevent shared caching of personalized cards, tasks, and artifacts. - Enforce HTTPS, request rates, concurrent execution quotas, and Kestrel or proxy body limits before SDK deserialization. Require an approved JSON content type on
MapA2A, which readsHttpRequest.Bodydirectly; cap decompressed request bytes and reject oversized metadata before allocation or agent execution. - Enable browser access only for configured origins with a named CORS policy. If cookies authenticate A2A calls, enforce antiforgery validation on state-changing