Title: Wire SSRF guard into legacy webhooks.deliver() · Issue #299 · adcontextprotocol/adcp-client-python · GitHub
Open Graph Title: Wire SSRF guard into legacy webhooks.deliver() · Issue #299 · adcontextprotocol/adcp-client-python
X Title: Wire SSRF guard into legacy webhooks.deliver() · Issue #299 · adcontextprotocol/adcp-client-python
Description: Summary adcp.webhooks.deliver() (the deprecated AdCP 3.x HMAC-SHA256 path) constructs an unpinned httpx.AsyncClient(timeout=...) and POSTs to a buyer-controlled URL when no operator client is supplied. No SSRF guard. Source: src/adcp/web...
Open Graph Description: Summary adcp.webhooks.deliver() (the deprecated AdCP 3.x HMAC-SHA256 path) constructs an unpinned httpx.AsyncClient(timeout=...) and POSTs to a buyer-controlled URL when no operator client is suppl...
X Description: Summary adcp.webhooks.deliver() (the deprecated AdCP 3.x HMAC-SHA256 path) constructs an unpinned httpx.AsyncClient(timeout=...) and POSTs to a buyer-controlled URL when no operator client is suppl...
Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/299
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wire SSRF guard into legacy webhooks.deliver()","articleBody":"## Summary\n\n`adcp.webhooks.deliver()` (the deprecated AdCP 3.x HMAC-SHA256 path) constructs an unpinned `httpx.AsyncClient(timeout=...)` and POSTs to a buyer-controlled URL when no operator client is supplied. **No SSRF guard.**\n\nSource: `src/adcp/webhooks.py:867-872`. Surfaced by security-reviewer on PR #297 as L4 — explicitly deferred from the prep PR scope.\n\n## Why deferred\n\n`deliver()` is the AdCP 3.x deprecated path; emits `DeprecationWarning` already; new traffic goes through `WebhookSender`. PR #297 was scoped to RFC 9421 sender hardening.\n\n## Proposed fix\n\nMirror the `WebhookSender._send_bytes` pattern:\n- When the operator supplies a client, trust them.\n- When the sender owns the client, build a per-request `AsyncIpPinnedTransport` via `build_async_ip_pinned_transport(url, ...)` and construct `httpx.AsyncClient(transport=transport, follow_redirects=False, trust_env=False)`.\n- Same `allow_private_destinations` and `allowed_destination_ports` kwargs on the public surface.\n\n## Risk\n\nAdopters on the legacy `deliver()` path posting to private/internal endpoints (dev/test fixtures) will start getting `SSRFValidationError`. One-kwarg opt-out via `allow_private=True` (or whatever name fits the existing `deliver()` surface).\n\n## References\n\n- Code: `src/adcp/webhooks.py:867-872`\n- Pattern to mirror: `src/adcp/webhook_sender.py:_send_bytes` (post PR #297)\n- Sec audit reference: `.context/foundations-audit/FINDINGS.md`","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-04-29T17:23:57Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/299"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9916a943-3987-ca1c-6582-6e9e74335abb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8398:240CD1:CEDA50:1089991:6B0101EE |
| html-safe-nonce | 27db9b746fc604a0bbed86a906961f071935ca2822995bf99a38bd81149c84cd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Mzk4OjI0MENEMTpDRURBNTA6MTA4OTk5MTo2QjAxMDFFRSIsInZpc2l0b3JfaWQiOiIyNjk3MzQzNzc1NTUzOTQ2MDk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3982f8c030d3987bc2c4d7327ae1df91acba149f9c1e7a604dd499b1afa27c62 |
| hovercard-subject-tag | issue:4352419341 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/299/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b8f6c3f92d9ce3ddbb46ea0b6dd9bb11ddab9cb2a9722d29f7ea4417b095e92c/adcontextprotocol/adcp-client-python/issues/299 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b8f6c3f92d9ce3ddbb46ea0b6dd9bb11ddab9cb2a9722d29f7ea4417b095e92c/adcontextprotocol/adcp-client-python/issues/299 |
| og:image:alt | Summary adcp.webhooks.deliver() (the deprecated AdCP 3.x HMAC-SHA256 path) constructs an unpinned httpx.AsyncClient(timeout=...) and POSTs to a buyer-controlled URL when no operator client is suppl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bokelley |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git |
| octolytics-dimension-user_id | 221690821 |
| octolytics-dimension-user_login | adcontextprotocol |
| octolytics-dimension-repository_id | 1090305973 |
| octolytics-dimension-repository_nwo | adcontextprotocol/adcp-client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1090305973 |
| octolytics-dimension-repository_network_root_nwo | adcontextprotocol/adcp-client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width