Repository navigation
Per-lane ca_bundle and insecure for http lanes (#78), v1.2.0 - #130
Conversation
A self-hosted endpoint behind a private CA failed certificate checks, and the only workaround was PYTHONHTTPSVERIFY=0, which turns verification off for every lane, OpenRouter included. - ca_bundle: PATH trusts that PEM file instead of the system roots, for that lane only (~ is expanded). A missing or bad file fails the lane with an error that names the path. - insecure: true turns verification off for one lane and prints a warning on every call. It cannot be a default, cannot be combined with ca_bundle, and is rejected on cli/acp lanes. - skill/toolpanel.py uses the same per-lane context. - Tests use a real HTTPS stub with a throwaway CA: refused without a bundle, accepted with one, insecure warns, and the bundle replaces the system roots. Default behavior is unchanged when neither key is set. Closes #78 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015eWZfxrGjWj2QpwdgFwBjR
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (4)
🧰 Additional context used🪛 ast-grep (0.45.3)skill/toolpanel.py[info] 98-98: use jsonify instead of json.dumps for JSON output (use-jsonify) [warning] 99-99: Request-controlled URL passed to urlopen; validate against an allowlist to prevent SSRF. (urlopen-unsanitized-data) tests/test_roundtable.py[warning] 274-274: Do not make http calls without encryption (requests-http) 🪛 Ruff (0.16.7)skill/toolpanel.py[warning] 89-120: Missing explicit Add explicit (RET503) [error] 98-98: Audit URL open for permitted schemes. Allowing use of (S310) [error] 99-99: Audit URL open for permitted schemes. Allowing use of (S310) tests/test_roundtable.py[warning] 221-221: Missing return type annotation for private function (ANN202) [warning] 265-265: Missing return type annotation for special method Add return type annotation: (ANN204) [warning] 268-268: Missing return type annotation for special method (ANN204) [warning] 294-294: Missing return type annotation for classmethod Add return type annotation: (ANN206) [warning] 299-299: Missing return type annotation for classmethod Add return type annotation: (ANN206) [warning] 300-300: Boolean positional value in function call (FBT003) [warning] 302-302: Missing type annotation for (ANN003) [warning] 306-307: Use a single (SIM117) [warning] 307-307: Use Replace (PT027) [warning] 323-323: Use Replace (PT027) [warning] 450-450: Use Replace (PT027) [warning] 456-456: Use Replace (PT027) 🔇 Additional comments (4)
📝 SummarySummary by CodeRabbit
WalkthroughHTTP lanes can now use a lane-specific CA bundle or disable TLS verification for that lane. Configuration validation enforces where these options can be used, and HTTP request paths pass the resulting TLS context to ChangesHTTP lane TLS
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant HTTPRequest
participant tls_context
participant urlopen
HTTPRequest->>tls_context: Build context from lane settings
tls_context-->>HTTPRequest: Return context or None
HTTPRequest->>urlopen: Open request with context
Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue remains; the TLS configuration change is ready for normal merge checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 2 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #78
Why
An
httplane pointed at a self-hosted or corporate endpoint behind a private CA failed certificate checks. The only workaround wasPYTHONHTTPSVERIFY=0, which turns verification off for every lane, OpenRouter included.What
ca_bundle: PATHtrusts that PEM file instead of the system roots, for that lane only, so a private CA can't vouch for any other host.~is expanded. A missing or bad file fails the lane with an error that names the path.insecure: trueturns verification off for one lane and printswarning: <lane>: TLS verification is OFFon every call. It is rejected as adefaultskey, rejected together withca_bundle, and rejected oncli/acplanes.skill/toolpanel.pyuses the same per-lane SSL context.urlopengetscontext=None, exactly as before.The version goes from 1.1.1 to 1.2.0, a minor bump because these are new opt-in config keys.
Verification
TestPerLaneTLSruns a real HTTPS stub with a throwaway CA built withcryptography, which is already the one dependency:CERTIFICATE_VERIFY_FAILED;insecureit connects and warns;ResourceWarnings.🤖 Generated with Claude Code
https://claude.ai/code/session_015eWZfxrGjWj2QpwdgFwBjR
Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/