Repository navigation
fix: use archive checksums for Bazel registry packages - #17
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Explicitly supplied incomplete or malformed caches currently succeed while silently omitting checksums.
1 open finding
What changed in this PR
Corrects Bazel registry package checksums by verifying source.json and extracting archive metadata.
Changes:
- Adds verified registry metadata collection and offline caching.
- Emits archive checksums and URLs in SBOM outputs.
- Adds regression tests, smoke coverage, and documentation.
| File | Description |
|---|---|
README.md |
Documents registry checksum handling and caching. |
defs.bzl |
Exposes registry cache options. |
internal/rules.bzl |
Generates or consumes registry metadata caches. |
internal/generator/registry_metadata.py |
Validates metadata and extracts archive details. |
internal/generator/sbom_generator.py |
Integrates verified archive metadata. |
internal/generator/BUILD |
Adds the metadata library dependency. |
scripts/generate_registry_metadata_cache.py |
Downloads and verifies registry metadata. |
scripts/BUILD.bazel |
Defines cache generator targets. |
tests/test_registry_checksums.py |
Adds checksum and cache regression tests. |
tests/test_sbom_generator.py |
Updates lockfile checksum expectations. |
tests/fixtures/boost.config-1.83.0.bcr.4-source.json |
Provides real Boost metadata. |
tests/BUILD |
Registers the new tests. |
examples/dummy_project/registry_smoke_test.py |
Verifies live registry metadata output. |
examples/dummy_project/BUILD.bazel |
Adds the registry smoke test target. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
nicu1989
force-pushed
the
nicu1989_sbom_checksum_fix
branch
from
October 14, 2026 11:25
8d53174 to
f8e4671
Compare
nicu1989
force-pushed
the
nicu1989_sbom_checksum_fix
branch
from
October 14, 2026 15:08
f8e4671 to
be6fdf1
Compare
nicu1989
force-pushed
the
nicu1989_sbom_checksum_fix
branch
from
October 14, 2026 15:19
be6fdf1 to
134407c
Compare
The generator used `source.json` file hashes as package checksums. These hashes identify registry metadata rather than the downloaded archives. Download `source.json`, verify it against `MODULE.bazel.lock` and read the archive checksum from its integrity field. Include the archive URL in the SPDX package entry. Support cached metadata for offline builds and reject invalid metadata. Update the checksum documentation and add regression tests using real Boost metadata. Signed-off-by: Nicolae Dicu <nicolae.dicu.ext@qorix.ai>
nicu1989
force-pushed
the
nicu1989_sbom_checksum_fix
branch
from
October 15, 2026 08:02
134407c to
3d96ae1
Compare
masc2023
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


The generator used
source.jsonfile hashes as package checksums. These hashes identify registry metadata rather than the downloaded archives.Download
source.json, verify it againstMODULE.bazel.lockand read the archive checksum from its integrity field. Include the archive URL in the SPDX package entry.Support cached metadata for offline builds and reject invalid metadata. Update the checksum documentation and add regression tests using real Boost metadata.
Closes: #16