Use shared integrity module - #35
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request migrates CycloneDX lockfile SRI handling to the shared github.com/git-pkgs/integrity module, enabling round-tripping of multiple supported SRI digests while keeping pin/integrity as deprecated compatibility wrappers.
Changes:
- Switch CycloneDX lockfile read/write to use
github.com/git-pkgs/integrity, preserving multiple SRI digests for both file and package hashes. - Add CycloneDX tests covering multi-hash round-trip, malformed supported hashes rejection, and ignoring unsupported hashes.
- Replace
pin/integrityimplementation with thin deprecated wrappers and remove associated fuzz/bench tests; add the new shared module dependency.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Makefile | Removes fuzz targets for the legacy integrity package (tests were removed). |
| lock/cyclonedx.go | Uses shared integrity parsing/formatting and supports encoding/decoding multiple hashes. |
| lock/cyclonedx_test.go | Adds coverage for multi-hash round-trips and hash validation behavior. |
| integrity/sri.go | Converts legacy SRI helpers into deprecated wrappers over the shared module. |
| integrity/sri_test.go | Adds a test ensuring legacy ParseSRI returns the first digest from multi-hash input. |
| integrity/fuzz_test.go | Removes fuzz tests for legacy integrity implementation. |
| integrity/bench_test.go | Removes benchmarks for legacy integrity implementation. |
| go.mod | Adds dependency on github.com/git-pkgs/integrity v0.1.0. |
| go.sum | Adds checksums for github.com/git-pkgs/integrity v0.1.0. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
andrew
marked this pull request as ready for review
August 15, 2026 21:45
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.
Use
github.com/git-pkgs/integrityfor SRI parsing and preserve every supported digest when reading and writing CycloneDX lockfiles. The oldpin/integritypackage is removed.Closes #34