Skip to content

Build the root agent's wheel with a build backend pinned by hash - #4

Merged
drobison00 merged 1 commit into
mainfrom
fix/pin-build-backend
Oct 31, 2026
Merged

drobison00 merged 1 commit into
mainfrom
fix/pin-build-backend

Conversation

@drobison00

Copy link
Copy Markdown
Owner

bundle ran uv build, which resolved hatchling and its imports fresh on every build, outside uv.lock. The manifest hashes are taken after the build, so they could not tell a wheel written by a compromised backend release from a good one, and install-agent puts that wheel in /opt as root. Every other input to the bundle was already pinned: nats-py comes from uv.lock by hash.

build-constraints.txt pins hatchling and everything it imports by hash, resolved as of two weeks back (hatchling 1.32.4; 1.33.0 was three days old), and bundle builds with --require-hashes --build-constraints on it. Measured with uv 0.5.21: a tampered hash is refused, a build requirement missing from the file is refused, and a warm cache does not bypass either. A test holds every requirement in the file to a hash.

`bundle` ran `uv build`, which resolved hatchling and its imports fresh
on every build, outside uv.lock. The manifest hashes are taken after the
build, so they could not tell a wheel written by a compromised backend
release from a good one, and install-agent puts that wheel in /opt as
root. Every other input to the bundle was already pinned: nats-py comes
from uv.lock by hash.

build-constraints.txt pins hatchling and everything it imports by hash,
resolved as of two weeks back (hatchling 1.32.4; 1.33.0 was three days
old), and bundle builds with --require-hashes --build-constraints on it.
Measured with uv 0.5.21: a tampered hash is refused, a build requirement
missing from the file is refused, and a warm cache does not bypass
either. A test holds every requirement in the file to a hash.
@drobison00
drobison00 merged commit 77f441f into main Oct 31, 2026
1 of 3 checks passed
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