fix(policy): add tls: skip to brew preset endpoints (#2331) - #2338
Conversation
OpenShell v0.0.15+ auto-terminates TLS on every detected TLS stream. Without an explicit tls: skip, git inside the sandbox receives the proxy's MITM certificate instead of the real server certificate and fails with 'server certificate verification failed. CAfile: none'. curl succeeds because it picks up the proxy CA from the sandbox environment, but git's OpenSSL does not — proving the issue is TLS termination, not network connectivity. Add tls: skip to all six brew preset endpoints so the proxy performs L4 pass-through, letting git validate the real server certificates. This follows the same pattern used for Discord WebSocket endpoints in PR NVIDIA#2098. Signed-off-by: kagura-agent <kagura-agent@users.noreply.github.com> Signed-off-by: kagura-agent <kagura.agent.ai@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
✨ Thanks for submitting this issue that identifies a bug with the brew preset and proposes a fix. Related open PRs: Related open issues: |
…IDIA#2338) ## Summary Add `tls: skip` to all six endpoints in the `brew` policy preset so the L7 proxy performs L4 pass-through instead of TLS termination. ## Problem After OpenShell v0.0.15+ began auto-terminating TLS on every detected TLS stream ([OpenShell#544](NVIDIA/OpenShell#544)), `git` inside the sandbox fails with: ``` fatal: unable to access 'https://github.com/Homebrew/brew.git/': server certificate verification failed. CAfile: none CRLfile: none ``` `curl` to the same host through the same proxy succeeds, and `git -c http.sslVerify=false` also succeeds — isolating the defect to the proxy's TLS termination presenting a certificate that git's OpenSSL cannot validate. ## Fix Add `tls: skip` to all brew preset endpoints (`formulae.brew.sh`, `github.com`, `ghcr.io`, `pkg-containers.githubusercontent.com`, `objects.githubusercontent.com`, `raw.githubusercontent.com`). This restores L4 pass-through so git validates the real server certificates directly. This follows the same pattern established in PR NVIDIA#2098 for Discord/Slack WebSocket endpoints. ## Test plan - [x] `npx vitest run test/policies.test.ts` — 86 tests pass - [ ] Nightly E2E: `brew` preset `git ls-remote` against whitelisted endpoint succeeds without `http.sslVerify=false` Fixes NVIDIA#2331 Signed-off-by: kagura-agent <kagura-agent@users.noreply.github.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated network policy presets to modify TLS certificate verification behavior for connections to multiple package repository and external service endpoints supporting package management operations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: kagura-agent <kagura-agent@users.noreply.github.com> Signed-off-by: kagura-agent <kagura.agent.ai@gmail.com>
Summary
Add
tls: skipto all six endpoints in thebrewpolicy preset so the L7 proxy performs L4 pass-through instead of TLS termination.Problem
After OpenShell v0.0.15+ began auto-terminating TLS on every detected TLS stream (OpenShell#544),
gitinside the sandbox fails with:curlto the same host through the same proxy succeeds, andgit -c http.sslVerify=falsealso succeeds — isolating the defect to the proxy's TLS termination presenting a certificate that git's OpenSSL cannot validate.Fix
Add
tls: skipto all brew preset endpoints (formulae.brew.sh,github.com,ghcr.io,pkg-containers.githubusercontent.com,objects.githubusercontent.com,raw.githubusercontent.com). This restores L4 pass-through so git validates the real server certificates directly.This follows the same pattern established in PR #2098 for Discord/Slack WebSocket endpoints.
Test plan
npx vitest run test/policies.test.ts— 86 tests passbrewpresetgit ls-remoteagainst whitelisted endpoint succeeds withouthttp.sslVerify=falseFixes #2331
Signed-off-by: kagura-agent kagura-agent@users.noreply.github.com
Summary by CodeRabbit