Skip to content

fix(cli): verify TLS against the OS trust store - #96

Merged
mrchtr merged 1 commit into
mainfrom
fix/windows-ssl-truststore
Oct 23, 2026
Merged

mrchtr merged 1 commit into
mainfrom
fix/windows-ssl-truststore

Conversation

@mrchtr

@mrchtr mrchtr commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Problem

On Windows behind a TLS-inspecting corporate proxy, haystack-enterprise login (and other commands) fail with CERTIFICATE_VERIFY_FAILED. httpx and aiohttp check certificates against certifi's bundled list, which doesn't include the proxy's root certificate. That certificate is installed in the Windows store, which is why the browser login page works.

Fix

  • Call truststore.inject_into_ssl() in the CLI entry point (run_packaged), so every command checks certificates against the OS store.
  • Limited to the CLI: the SDK used as a library leaves ssl alone; AGENTS.md explains how to opt in.
  • Add truststore>=0.10.0 as a dependency (uv.lock updated).

Testing

  • New unit test checks the CLI entry point turns this on.
  • make tests-unit (770 passed), make types, make all-fix, uv lock --check all pass.
  • Not tested on Windows yet: needs confirmation from an affected user.

🤖 Generated with Claude Code

https://claude.ai/code/session_019FaSZo4b27zdYaxRGv43ZK

On Windows behind TLS-inspecting corporate proxies, login and other
commands failed with CERTIFICATE_VERIFY_FAILED: httpx/aiohttp use
certifi, which lacks the proxy's root CA installed in the OS store.
Inject truststore in the CLI entrypoint only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  haystack_enterprise_sdk
  cli.py
Project Total  

This report was generated by python-coverage-comment-action

@mrchtr
mrchtr merged commit 11ddb7f into main Oct 23, 2026
7 checks passed
@mrchtr
mrchtr deleted the fix/windows-ssl-truststore branch October 23, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants