Skip to content

Commit

Permalink
exporter: fix supplement sboms on empty scratch layer
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Chadwell <me@jedevc.com>
  • Loading branch information
jedevc committed Feb 10, 2023
1 parent 32dc0ec commit f3db114
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exporter/containerimage/attestations.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ var intotoPlatform ocispecs.Platform = ocispecs.Platform{

// supplementSBOM modifies SPDX attestations to include the file layers
func supplementSBOM(ctx context.Context, s session.Group, target cache.ImmutableRef, targetRemote *solver.Remote, att exporter.Attestation) (exporter.Attestation, error) {
if target == nil {
return att, nil
}
if att.Kind != gatewaypb.AttestationKindInToto {
return att, nil
}
Expand Down

0 comments on commit f3db114

Please sign in to comment.