Skip to content

Add sha256 to dependencies - #344

Merged
anthonydahanne merged 1 commit into
mainfrom
fix-sha256
Oct 14, 2026
Merged

anthonydahanne merged 1 commit into
mainfrom
fix-sha256

Conversation

@dmikusa

@dmikusa dmikusa commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

libpak reads the dependency hash from metadata.dependencies[].sha256, not checksum. The migration to libdependency's retrieval sets Checksum (sha256:…) but never SHA256, so libpak skips the dependency cache ("Dependency has no SHA256. Skipping cache.") and downloads are never verified.

This fixes the retrieval script so the next version bump keeps sha256, matching the fix already made in syft (paketo-buildpacks/syft#495).

Changes

  • Set SHA256 alongside Checksum when building each dependency

Verification

  • go build ./..., go vet ./..., golangci-lint run — clean

Fixes the same issue as paketo-buildpacks/syft#494.


This PR was produced with opencode and reviewed by a human.

libpak reads `metadata.dependencies[].sha256`, not `checksum`, so without it
libpak skips the dependency cache and never verifies downloads.

Fixes the retrieval script so the next version bump keeps `sha256`, matching
paketo-buildpacks/syft#495.

Signed-off-by: Daniel Mikusa <dan@mikusa.com>
@dmikusa
dmikusa requested a review from a team as a code owner October 14, 2026 18:39
@dmikusa dmikusa added the semver:patch A change requiring a patch version bump label Oct 14, 2026
@anthonydahanne
anthonydahanne merged commit 3dde21e into main Oct 14, 2026
9 of 10 checks passed
@anthonydahanne
anthonydahanne deleted the fix-sha256 branch October 14, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:patch A change requiring a patch version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants