Skip to content

Upgrade dependencies and proxy the live sockets - #395

Merged
jserv merged 5 commits into
mainfrom
security
Oct 21, 2026
Merged

jserv merged 5 commits into
mainfrom
security

Conversation

@jserv

@jserv jserv commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

webpki-roots before 1.0.10 and rustls-webpki before 0.103.16 can accept certificate paths through distrusted emSign intermediates (RUSTSEC-2026-0381, RUSTSEC-2026-0382). The first commit moves every direct dependency to its latest release and vendors livekit-net 0.1.4 and tokio-tungstenite 0.30.0 with only their manifests changed, since both still pin webpki-roots 0.26; each vendor README names the upstream release that lets it go. The webrtc-sys-build zip workaround is dropped because 0.3.20 is on zip 9. reqwest 0.13 verifies against the machine's certificate store by default, so one rustls configuration with Mozilla's roots now serves every HTTP client and the Gemini socket, keeping the binary free of any CA store requirement. Dependabot loses its ignore rules, since an ignore also suppresses security pull requests, and LiveKit and tree-sitter security updates are grouped like their version updates. A new vendor-patches gate fails when a vendored crate also resolves from the registry, so a bump that outruns a vendored copy cannot quietly bring the vulnerable crate back.

The second commit makes the interview work behind a proxy. HTTP calls already honored HTTPS_PROXY, but the Gemini Live socket connected directly and LiveKit's transport refused a proxied wss:// connection without native roots. The Gemini socket now uses hyper-util's proxy matcher and CONNECT tunnel, the ones reqwest uses, and the vendored LiveKit transport gives its proxied path the bundled roots. docs/install.md describes what goes through the proxy and what does not.

Verification: scripts/test.sh passes with nothing skipped at each commit, including cargo audit (no vulnerabilities, 353 crates) and the new gate; the gate was also run against a lockfile with a registry copy of tokio-tungstenite added and fails naming it. The LiveKit proxy test fails against upstream's proxy code and passes with the patch. The live interview harness in tests/interview_behavior.rs needs credentials and was not run.

Left out: reqwest 0.12/0.13 and tower-http 0.6/0.7 each still build twice, because LiveKit is on reqwest 0.12 and reqwest 0.13 is on tower-http 0.6, and pinning back would block their security updates. Removing the tokio-tungstenite vendor copy by accepting webpki-roots 0.26.11, which re-exports the 1.0.10 roots, would need a cargo audit ignore for an advisory that names only 1.0.10 as patched. LiveKit signaling still ignores NO_PROXY, as upstream does, and https:// and SOCKS proxies are not supported, matching reqwest as built here.


Summary by cubic

Fixes two certificate-vetting RUSTSEC advisories (webpki-roots and rustls-webpki accepted paths through distrusted emSign intermediates) and makes the live interview work through a proxy.

Security and dependencies

  • Moves every direct dependency to its latest release; livekit-net and tokio-tungstenite are vendored with only their manifests changed until upstream releases patched versions, and the webrtc-sys-build zip workaround is dropped.
  • A single rustls configuration with Mozilla's compiled-in roots now serves every HTTP client and the Gemini socket, so the binary still verifies each host without requiring a machine CA store. Ring is installed as the process-wide crypto provider, which LiveKit's transport relies on when building its TLS client, and a child-process test guards that.
  • Dependabot's ignore rules are removed (an ignore also suppresses security pull requests), and a new vendor-patches gate fails a bump that would silently bring a vendored crate back from the registry, or when the lockfile is unreadable.

Proxy support

  • The Gemini Live socket now tunnels through HTTPS_PROXY using hyper-util's proxy matcher and CONNECT, the same rules reqwest already applies; it previously connected directly.
  • The vendored LiveKit transport gives its proxied wss:// path the bundled roots, which upstream refused unless the machine's roots were enabled.
  • docs/install.md now notes the avatar model is fetched by the browser through its own proxy settings and does not use the binary's HTTPS_PROXY.

Trade-offs: reqwest and tower-http each still build two major versions until upstream moves; NO_PROXY is not honored by LiveKit signaling; only http:// proxies are supported; a TLS-inspecting proxy is refused because its CA is outside the bundled roots.

Written for commit 50bf421. Summary will update on new commits.

View guided diff Turn on auto-fix

jserv added 2 commits October 21, 2026 10:01
webpki-roots before 1.0.10 and rustls-webpki before 0.103.16 can accept
certificate paths through distrusted emSign intermediates
(RUSTSEC-2026-0381 and RUSTSEC-2026-0382). Every direct dependency now
takes its latest release. LiveKit's transport and tokio-tungstenite
still pin webpki-roots 0.26, so both are vendored with only their
manifests changed until upstream releases a fix, dropping the bytes
dependency LiveKit's transport never used; the zip workaround goes
because webrtc-sys-build 0.3.20 is on zip 9. reqwest 0.13 verifies
against the machine's certificate store by default, which would break
the promise that the binary needs nothing beside it, so one rustls
configuration with Mozilla's roots now serves every HTTP client and the
Gemini socket. Dependabot loses its ignore rules, since an ignore also
suppresses security pull requests, and a bump past a vendored crate
fails the new vendor-patches gate instead. The trade is reqwest and
tower-http building two majors until LiveKit and reqwest catch up.
HTTP calls already went through HTTPS_PROXY by way of reqwest, but the
Gemini Live socket connected directly and LiveKit's transport refused a
proxied wss:// connection unless the machine's roots were enabled. On a
network that only lets traffic out through a proxy, the report worked
and the interview did not. The Gemini socket now uses reqwest's own
proxy matcher and CONNECT tunnel from hyper-util, which reqwest already
builds, and the vendored LiveKit transport gives its proxied path the
bundled roots its direct path uses. Only http:// proxies are supported,
matching reqwest without its SOCKS feature, and LiveKit signaling still
ignores NO_PROXY, as upstream does; docs/install.md says both.
cubic-dev-ai[bot]

This comment was marked as resolved.

jserv added 3 commits October 21, 2026 10:24
The mutation lane found that emptying install_crypto_provider passed
every test, though LiveKit's transport builds its TLS client on the
process-wide provider and would panic without one once a second
provider is compiled in. The check runs in a child process, since a
test in the same process that joined a room may already have installed
a provider, and it compares the installed cipher suites with ring's.
The gate piped awk into sort, so the pipeline's status was sort's: with
Cargo.lock missing or unreadable, awk printed an error, the result was
empty, and the gate passed. awk now removes duplicates itself and the
gate fails on its exit status.
The proxy paragraph in the install guide said HTTP requests go through
HTTPS_PROXY, which reads as covering the avatar model too. The browser
fetches that model itself, so it follows the browser's proxy settings,
and the paragraph now limits the claim to the binary's own requests.
@jserv
jserv merged commit d27375a into main Oct 21, 2026
10 checks passed
@jserv
jserv deleted the security branch October 21, 2026 02:40
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.

1 participant