Skip to content

Make build hash verification and trust explicit - #22248

Draft
zanieb wants to merge 8 commits into
mainfrom
zb/resolve-build-hash-policies
Draft

zanieb wants to merge 8 commits into
mainfrom
zb/resolve-build-hash-policies

Conversation

@zanieb

@zanieb zanieb commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

HashCheckingMode does not capture which build requirements may introduce trusted hashes. BuildDispatch currently infers that choice from the hash strategy, and uv build overrides it to distinguish --require-hashes from --require-build-hashes. Resolve the configured build request into a BuildHashPolicy that records verification and trusted sources, and pass it explicitly to dispatch. Resolve the uv pip runtime and build policies together after reading requirements-file directives.

Stacked on #21411.

zsol and others added 6 commits October 6, 2026 13:02
Update wheel fixtures and diagnostic snapshots for the shared test and
error-reporting APIs.
Keep selection of the build hash strategy alongside its treatment of
backend-generated requirements in a single `match`, and move the URL
traversal comment next to the lookahead resolver.

Stacked on #21411.
Comment thread crates/uv/src/commands/pip/sync.rs Outdated
Comment on lines +67 to +68
hash_checking: Option<HashCheckingMode>,
build_hash_checking: HashCheckingMode,
require_build_hashes: bool,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

hmm it seems pretty dubious to have a bool next to HashCheckingMode, as it does to have two HashCheckingMode? hm.

@zanieb zanieb changed the title Resolve runtime and build hash policies together Make build hash verification and trust explicit Oct 6, 2026
@astral-sh-bot

astral-sh-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown

uv test inventory changes

This PR changes the tests when compared with the zsol/project-build-hashes-fresh-20260901 base revision.

  • Added tests: 1
  • Removed tests: 0
  • Changed suites: 1
uv::pip: +1 / -0

Added:

  • uv::pip::pip_sync::build_hash_policies

Removed: none

@zsol
zsol force-pushed the zsol/project-build-hashes-fresh-20260901 branch 2 times, most recently from 4649700 to 4ca3452 Compare October 9, 2026 14:39
Base automatically changed from zsol/project-build-hashes-fresh-20260901 to main October 9, 2026 15:16

This branch was previously deployed

1 inactive deployment
automations — 49b33770 Deployed Oct 6, 2026 by zanieb via review / security review #49542
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

⌂ 换网址