Skip to content

Commit

Permalink
chore: compare trivy reports
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrabovcin committed Feb 19, 2024
1 parent e548b82 commit 7f39e49
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/actions/copacetic-action/pkg/patch/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ func Run(ctx context.Context, imageRef string, reg registry.Registry, imageTagSu
patchedRef := imagePatch.SourceRef().Context().Tag(buildTag)
logger.Info("regenerated image using copa", "patchedRef", patchedRef.String())

patchedReport, err := image.Scan(ctx, patchedRef.String())
if err != nil {
return withErr(t, err), err
}
logger.Info(
"patched vulnerability report",
"original", report.Vulnerabilities(),
"patched", patchedReport.Vulnerabilities(),
)

// Add labels to the newly built image
labels := map[string]string{
"com.d2iq.source-image": imagePatch.Source,
Expand Down

0 comments on commit 7f39e49

Please sign in to comment.