feat(transport): add HTTP/SSE transport support to pin and check (DSE-57)#74
Merged
Conversation
…FIL-DNS-SSRF, #11) Closes the bypass where WRD-RES-EXFIL-IP-LITERAL could not fire because the tools/call result contained a DNS hostname (e.g. 169.254.169.254.nip.io) rather than a raw IP literal. New rule WRD-RES-EXFIL-DNS-SSRF: guard resolves URL hostnames from result text at runtime via concurrent.futures.ThreadPoolExecutor (bounded 1 s, fail-open) and error-replaces when any resolved IP falls in SSRF_NETWORKS (link-local, loopback, RFC1918, IPv6 ULA/link-local/loopback). Opt-out via --no-block-exfil-dns-ssrf or --no-block-deterministic. Offline inspect command unchanged. Files: res_dns.py (new), res_catalog.py, result_inspection.py, guard_loop.py, guard_result.py, cli_guard.py, tests/test_res_dns.py (19 new), test_guard_posture.py (+4). All 530 tests pass. Closes DSE-58.
…workflow The repo transferred to DataScience-EngineeringExperts but the --certificate-identity flag still referenced the personal account (ernestprovo23). Fulcio mints a cert whose SAN reflects the actual org, so the exact-string equality check in sigstore 4.3.0 failed. Updated both the verify and negative-proof steps. Fixes Sigstore sign+verify (live) failure on PR #73.
…-57) Add streamable_http_client path to capture.py (_capture_http_async, capture_surface_http, capture_surface_http_sync). Extend CapturedSurface and ServerIdentity with optional url field (backward-compat, defaults None). Update _server_identity() to hash the URL when set. Route check_core run_check_full() and cli pin/check commands through HTTP capture when --url is provided; mutually exclusive with positional server-cmd. 6 new tests (async + sync, mocked transport, error paths).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_capture_http_async()/capture_surface_http()/capture_surface_http_sync()usingmcp.client.streamable_http.streamable_http_client(already available in the MCP SDK)CapturedSurfaceandServerIdentitywith optionalurl: str | None = Nonefield — fully backward-compatible (old locks missingurlparse cleanly)_server_identity()inlockfile.pyto hash{"url": url}ascommand_digestfor HTTP-transport pinscheck_core.run_check_full()through HTTP capture whenurlkwarg is set--urloption topinandcheckCLI commands (mutually exclusive with positionalserver-cmd)streamable_http_client, protocol version capture, tools/resources/prompts round-trip, connection error →CaptureError, timeout →CaptureError, sync wrapperNotes
guardHTTP proxy (run an HTTP server as a proxy) is out of scope for this PR — it requires a local HTTP server which is a distinct architectural piece. Tracked separately.mcp>=1.27.2)Test plan
make test→ 540 passed, 1 skippedwarden.lockfiles (nourlfield) still validateCloses DSE-57 / GitHub issue #9