Visitar URL original
feat(network): return JSON policy denials by default by toksdotdev · Pull Request #1825 · superradcompany/microsandbox · GitHub
Skip to content

feat(network): return JSON policy denials by default - #1825

Merged
toksdotdev merged 9 commits into
mainfrom
toks/json-http-denials
Oct 12, 2026
Merged

toksdotdev merged 9 commits into
mainfrom
toks/json-http-denials

Conversation

@toksdotdev

@toksdotdev toksdotdev commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Denied HTTP requests now return a JSON 403 with a stable error code, message, and requested domain. This also covers supported secret-policy violations, so agents can understand why a request was blocked.

  • Enable JSON denial responses by default across the CLI and SDKs, with separate network and secret messages.
  • Keep explicit opt-out and legacy text responses; require runtime support for JSON.
  • Only send secret denials when a first HTTP/1.x request can safely receive a response, before upstream response bytes reach the guest.
  • Support intercepted TLS to IP destinations without SNI, preserving certificate verification and secret-policy checks.
  • Update docs and protocol coverage, and preserve typed Go configuration errors across creation paths.

This changes the default from a connection error to HTTP 403, so callers need to check response status. Older configs with omitted settings inherit the new defaults; explicit false or text settings remain honored. Cloud behavior is unchanged.

Related to #1354.

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the previous documentation finding is fixed.

Reviews (9) · Last reviewed commit: "docs(sdk): use property sections for HTT..." · Reviewed by Greptile

Return structured network and secret policy errors with a stable code,
message, and destination domain for supported HTTP requests. Guard secret
responses against pipelining and upstream response bytes.

Expose format and per-policy messages across SDKs and CLI configuration,
retain explicit opt-out and legacy text mode, and validate runtime support.
Update documentation and protocol tests. Preserve typed Go config errors
across normal and progress creation.
@toksdotdev
toksdotdev requested a review from appcypher as a code owner October 11, 2026 02:07
@mintlify

mintlify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
microsandbox-staging 🟢 Ready View Preview Oct 12, 2026, 6:22 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Keep archive admission fixtures focused on layout and replacement checks by explicitly disabling HTTP denials unsupported by their historical runtimes.
Keep idle-exit and historical catalog checks independent of HTTP denial support by explicitly disabling responses in their sandbox builders.
Assert the default 403 response and secret denial payload instead of treating curl transport success as a policy bypass. Retain the upstream secret leakage check.
Parse complete ClientHellos with rustls and use the original destination IP when SNI is absent. Preserve upstream verification and secret checks instead of dropping IP-literal TLS connections. Cover fragmented hellos, malformed input, and live IP traffic with an unrelated secret.
Use cached DNS evidence for no-SNI policy decisions while retaining the destination IP for certificate and secret identity. Preserve legacy TLS bypass, reject malformed SNI during interception, and keep the first hostname for policy peeking.

Compare IP authorities by address and cover fragmented handshakes, policy enforcement, certificate verification, and secret denial with parser regressions and real-sandbox IPv4 and IPv6 tests.
Merge current main and update the new TLS regression tests for its upstream-stream constructor. Document the expected MemoryBIO handshake exceptions in the guest fixtures.
Comment thread docs/sdk/go/networking.mdx Resolved
Replace the changed Go and TypeScript HTTP table entries with property sections and visible signatures, preserving their defaults and denial-response links.

This branch was successfully deployed

1 active deployment
staging - docs — 9642b3f6 Deployed Oct 12, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:feat Category for generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant