Repository navigation
feat(network): honor HTTP_PROXY, HTTPS_PROXY and NO_PROXY for guarded requests, AWS SDK clients and OTLP export - #9851
Conversation
… outbound requests
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[High impact] The latest changes appear safe to merge, with no new actionable findings. SummaryThe PR adds environment-based proxy routing for guarded HTTP requests, AWS clients, and OTLP export.
The previous cancellation finding is fixed: both fetch adapters pass the caller’s signal to the destination check. The forbidden environment-cleanup hook is also gone. waleedlatif1 retained the loopback transport tests because they use managed local servers and follow the existing gateway tests; Greptile withdrew its request to move them. No numbered previous comments were supplied.
|
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 9 files
Confidence score: 4/5
environment-proxy.server.tshandles valid wildcard entries differently fromEnvHttpProxyAgent:*does not bypass all hosts, and*.example.comalso bypasses the apex. Align the matcher’s per-entry wildcard behavior.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/lib/core/network/environment-proxy.server.ts">
<violation number="1" location="apps/sim/lib/core/network/environment-proxy.server.ts:20">
P3: This matcher diverges from `EnvHttpProxyAgent` for valid wildcard entries: `none.invalid,*` does not bypass all hosts, while `*.example.com` incorrectly bypasses the apex. Handle `*` per entry and keep the `*.` form limited to subdomains so guarded and default fetches choose the same route.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 40 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…er the proxy agent as egress infrastructure
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
HTTPS_PROXY/HTTP_PROXY/NO_PROXYwith undici'sEnvHttpProxyAgentrules. Previously they connected straight to the pinned IP, so proxy-only deployments could not save an OIDC providersecureFetchWithPinnedIP, the pinned fetch, and the DNS-guarded fetch. SSRF checks still run: every proxied request and redirect hop is resolved and judged first (honoring the caller's abort signal); the proxy gets the hostname so domain-allowlisting proxies worknode:httpstack, which Bun does not proxy. They now take a sharedagent-baseagent that picks the proxy per connection and honorsNO_PROXY. Integration clients get it through a newawsClientConfigbesideawsClientCredentials, so new AWS families inherit itawsRequestHandlerreturns the caller's options and the SDK keeps its defaults (Bedrock keeps HTTP/2; with a proxy it uses HTTP/1.1, which Converse/ConverseStream support)httpstunnels via CONNECT,httpuses absolute-form forwarding;http://andhttps://proxy URLs are supported and anything else fails closed. Proxy credentials come from the URL and never reach the origin. The HTTP block's per-requestproxyUrlstill wins; gateway-routed orgs are unchangedHTTPS_PROXYwould silently reroute existing mail relaysDOMAIN_VERIFICATION_NAMESERVERSlets the SSO domain TXT lookup use an internal resolver instead of 1.1.1.1/8.8.8.8NO_PROXYguidance for MinIO, VPC endpoints and in-cluster collectorsType of Change
Testing
environment-proxy.server.test.tsagainst real local forward proxies (http and https) and a TLS origin: hostname tunneling + credential isolation for guarded fetches and an S3 client, pinned and DNS-guarded fetches, plain-http absolute-form,NO_PROXYbypass on both stacks, blocked destination and blocked redirect hop never reach the proxy, fail-closed on an unsupported proxy URL, env precedence table, and a probe under the real Bun runtime (guarded fetch + S3)awsRequestHandlerfails both AWS routing testslib/internal,lib/selectors,lib/core/network,lib/core/security,providers/bedrock, uploads, email, marketplace, config, monitoring, credentials, SSO suites pass/simplifyand/cleanuppasses applied; biome +check:test-patterns; type-check, audits and full suite in CIChecklist
test-auditauthoring gate)🤖 Generated with Claude Code