From fe6f6972055c13021b33ce61ff26927ee3a4dc5f Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Mon, 9 Jan 2023 18:09:06 +0000 Subject: [PATCH] inspect: break after first matching attestation Signed-off-by: Justin Chadwell (cherry picked from commit 19d16aa941baa6b6bdd397029471edb7fea6e190) --- util/imagetools/loader.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/imagetools/loader.go b/util/imagetools/loader.go index 8dbc32a6..5f9f3928 100644 --- a/util/imagetools/loader.go +++ b/util/imagetools/loader.go @@ -278,6 +278,7 @@ func (l *loader) scanSBOM(ctx context.Context, fetcher remotes.Fetcher, r *resul as.sbom = &sbomStub{ SPDX: dt, } + break } } } @@ -308,6 +309,7 @@ func (l *loader) scanProvenance(ctx context.Context, fetcher remotes.Fetcher, r as.slsa = &slsaStub{ Provenance: dt, } + break } } }