Skip to content

Commit

Permalink
fix: check if base image is nil (#57)
Browse files Browse the repository at this point in the history
Signed-off-by: felipecruz91 <[email protected]>
  • Loading branch information
felipecruz91 authored Feb 16, 2024
1 parent 21141f3 commit a0da367
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion policy/policy_handler/mocks/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func BuildLocalEvalMocks(ctx context.Context, req skill.RequestContext, sb *type
}

// Base image
if sb.Source.Provenance == nil {
if sb.Source.Provenance == nil || sb.Source.Provenance.BaseImage == nil {
req.Log.Info("Skipping base image mock, no provenance in SBOM")
} else {
baseImageMock := MockBaseImage(sb)
Expand Down

0 comments on commit a0da367

Please sign in to comment.