Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 3eb6de3

Browse files
committed
Add diff-id to lsp hashes
1 parent 7910587 commit 3eb6de3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sbom/lsp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func SendFileHashes(image string, tx chan<- string) error {
7676
h := sha256.New()
7777
h.Write(b)
7878
hash := fmt.Sprintf("sha256:%x", h.Sum(nil))
79-
msg := fmt.Sprintf(`{:path "%s" :hash "%s"}`, ref.RealPath, hash)
79+
msg := fmt.Sprintf(`{:path "%s" :hash "%s" :diff-id "%s"}`, ref.RealPath, hash, layer.Metadata.Digest)
8080
tx <- msg
8181
}
8282
}

0 commit comments

Comments
 (0)