fix: trust Windows system store CAs for kiro-cli on corporate proxies - #6230
fix: trust Windows system store CAs for kiro-cli on corporate proxies#6230shaibarlev wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Kiro Crew’s SSL bootstrap logic to better support Windows environments behind corporate TLS-inspecting proxies by generating and using a combined CA bundle so spawned kiro-cli processes (Rust TLS stack) can trust Windows enterprise CAs via SSL_CERT_FILE.
Changes:
- Add Windows-specific logic to export additional certificates from the Windows system Root/CA stores (excluding those already present in certifi’s Mozilla bundle).
- Generate a combined CA bundle under
config_dir()/ca-bundle.pemand pointSSL_CERT_FILE/REQUESTS_CA_BUNDLEat it when applicable. - Expand module and function documentation to describe the Windows corporate proxy failure mode and the mitigation approach.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
38183cc to
9cf4db1
Compare
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
First Principles Review (Fable 5, fork) — 🟡 CONCERNSPremise-level review of No duplicate mechanism exists — First-Principles-Verdict: CONCERNS The Windows trust fix is derived and singular, but the diff ships a no-op reformat and claims a protection it never adds — What this change shipsIntent: let Windows installs behind TLS-inspecting corporate proxies connect, by giving
Watch
Subtractions
[FIRST-PRINCIPLES-REVIEWED] b252d7e |
GPT 5.6 Review (fork) — 🔴 changes requested (blocking)Reviewed BLOCKING -- src/kiro_crew/_ssl_compat.py:247 -- Managed CA path bypasses the sensitive-path gate |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Import chain is clean ( Design-Verdict: PASS Child processes need a file, not a monkey-patch — the export-and-filter design is the only viable shape, and every failure path degrades to the previously-shipped verified route. Suggestions
[DESIGN-REVIEWED] b252d7e |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed |
9cf4db1 to
2b34625
Compare
2b34625 to
3f020d0
Compare
07adc8b to
b252d7e
Compare
Export HTTPS-capable trusted roots into an owner-only CA bundle so kiro-cli can connect through Windows TLS-inspecting proxies. Preserve explicit operator bundles and fall back without disabling verification.
b252d7e to
e78e721
Compare
Open PR relationship auditThis is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion. Relationship findings
No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit. |
|
Rebase onto main Two blockers:
|
|
🤖 Kiro Crew [operator: dwu96#8c08bee0]: This PR has been inactive for 7+ days. I reviewed the blockers but they require your input:
Two notes so you are not chasing the wrong things:
A maintainer already attempted the rebase onto When you've addressed these, the pipeline will re-assess on its next cycle. Add |
Problem / Motivation
On Windows behind a corporate TLS-inspecting proxy,
kiro-clichild processes can reject the proxy certificate withInvalidCertificate(UnknownIssuer): the enterprise root is trusted by Windows but absent from Mozilla's certifi roots.Why it matters
Kiro Crew starts
kiro-cliand MCP children that cannot inherit Python's process-local Windows trust evaluation. Without a verified child-process bundle, otherwise valid enterprise installations cannot connect. Disabling verification is not acceptable, and copying certifi unchanged would also retain a root that Windows explicitly placed inDisallowed.What changed
SSL_CERT_FILEat highest precedence.SSLContext.get_ca_certs(binary_form=True)rather than copying its PEM bytes.Disallowedfirst and use SHA-256 over DER as one identity rule across certifi and Windows ROOT. A disallowed certificate is excluded regardless of source.ROOT; never promote intermediates fromCA.REQUESTS_CA_BUNDLE.trust/ca-bundle.peminside the existing read/write-blockedtrust/boundary. Treat explicit command references toSSL_CERT_FILE,REQUESTS_CA_BUNDLE, and the managed provenance variable as aliases of that protected path, preventing PowerShell, cmd, POSIX-shell, and embedded-interpreter indirect writes without removing ambient TLS inheritance.Tests
is_sensitive_bash_commandand the realHookManagerpath.git diff --checkpassed.Manual verification
Verified against Windows' real
DisallowedandROOTstores. Eligible roots load into OpenSSL, explicit deny identities are not published in the generated mirror, and CLI import remains before HTTPS client initialization.Screenshots / video
Why no screenshot: This changes TLS bootstrap, security gates, tests, and documentation only; it has no rendered UI effect.