Skip to content

Enforce lock-file integrity when downloading RPM blobs. - #7

Merged
manuelnaranjo merged 1 commit into
mainfrom
mnaranjo/rpm-integrity-validation
Aug 6, 2026
Merged

manuelnaranjo merged 1 commit into
mainfrom
mnaranjo/rpm-integrity-validation

Conversation

@manuelnaranjo

Copy link
Copy Markdown
Member

The config/lock-file code path (bazeldnf.config -> _handle_lock_file -> _add_blob_rpm_repository) creates the repository that actually downloads each RPM, but never forwards the lock file's integrity/sha256 to the underlying rpm_repository rule. As a result ctx.download runs without a checksum, so a stale or mismatched hash in the lock file is never caught by any fetch or build (only the manual bazeldnf.rpm(...) tag path forwarded these fields).

Thread the lock entry's hash through so ctx.download verifies it. Entries that carry neither field remain unverified, exactly as before.

The config/lock-file code path (bazeldnf.config -> _handle_lock_file ->
_add_blob_rpm_repository) creates the repository that actually downloads each
RPM, but never forwards the lock file's integrity/sha256 to the underlying
rpm_repository rule. As a result ctx.download runs without a checksum, so a
stale or mismatched hash in the lock file is never caught by any fetch or build
(only the manual bazeldnf.rpm(...) tag path forwarded these fields).

Thread the lock entry's hash through so ctx.download verifies it. Entries that
carry neither field remain unverified, exactly as before.
@manuelnaranjo
manuelnaranjo merged commit a62b00d into main Aug 6, 2026
2 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