8000 uv: ship /etc/uv/uv.toml with system-certs = true (trust the system CA store) by bryan-minimal · Pull Request #1130 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content

uv: ship /etc/uv/uv.toml with system-certs = true (trust the system CA store) - #1130

Merged
bryan-minimal merged 1 commit into
mainfrom
sysca-uv-system-certs
Oct 28, 2026
Merged

bryan-minimal merged 1 commit into
mainfrom
sysca-uv-system-certs

Conversation

@bryan-minimal
Copy link
Copy Markdown
Member

Part of gominimal/pkgmgr-rs#1026 (prefer the system trust store), following the CVE-2026-111943 (eMudhra) response.

Why: uv trusts the Mozilla roots compiled into the binary unless system-certs is on. So a CA removed from ca-certificates stays trusted by uv until uv itself is rebuilt. The Cargo.lock floors on main keep the bundled list current only as of the last rebuild.

Change:

  • Ship /etc/uv/uv.toml with system-certs = true. That's uv's lowest-precedence config file, below the user's ~/.config/uv/uv.toml and the project's uv.toml.
  • uv then verifies through rustls-platform-verifier, which on Linux trusts only /etc/ssl/certs. needs.internet brings ca-certificates into every environment uv lands in.
  • Opt-outs that still work: --no-system-certs, system-certs = false in a user or project uv.toml, or UV_NO_SYSTEM_CONFIG=1. UV_SYSTEM_CERTS=false is not an opt-out, because uv only lets that variable turn the setting on. Both points are documented in build.sh.
  • system-certs is still the setting's name in uv 0.13.5 (crates/uv-settings/src/settings.rs; native-tls is the deprecated alias).

Test: the standalone system_certs test reads uv cache dir --show-settings, which needs no network. It checks that the setting is on by default, then each of the three opt-outs as negative controls.

This was the sysca/uv branch from 10-20, cherry-picked onto current main with no conflicts. deno and claude-code were done separately in #956.

🤖 Generated with Claude Code

uv trusts the bundled Mozilla roots unless system-certs is on, so a CA
removed from ca-certificates (CVE-2026-111943) stays trusted until uv is
rebuilt. The system-level uv.toml is uv's lowest-precedence config, so
--no-system-certs, a user or project system-certs = false, and
UV_NO_SYSTEM_CONFIG=1 still opt out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 7721460)
@bryan-minimal
bryan-minimal requested a review from a team as a code owner October 27, 2026 20:43
@coderabbitai
coderabbitai Bot commented Oct 27, 2026
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 39 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 66 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 756166c and 1e0256c.

Files selected for processing: 2
  • packages/uv/build.ncl
  • packages/uv/build.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mitodrummer mitodrummer left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uv reads /etc/uv/uv.toml as its lowest-precedence config, and system-certs routes verification through rustls-platform-verifier, which on Linux reads /etc/ssl/certs. uv declares needs.internet, so ca-certificates is injected into its closure. The test reads --show-settings offline and covers the default and all three opt-outs, and it passes on both arches.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 8893fc8 Oct 28, 2026
12 checks passed
@bryan-minimal
bryan-minimal deleted the sysca-uv-system-certs branch October 28, 2026 20:27
bryan-minimal added a commit that referenced this pull request Nov 2, 2026
…t (review)

The patched PREK_NATIVE_TLS default reads /etc/ssl/certs/ca-certificates.crt,
so the store has to be in prek's closure, as #1130/#1133/#1134/#1135 do.
Without it a session with prek and no store silently uses the compiled-in
roots. ca-certificates leaves system_ca_default's test_deps (base and git do
not bring it), so the test's `test -s` line now proves the runtime edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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

0