inspect: break after first matching attestation

Signed-off-by: Justin Chadwell <me@jedevc.com>
(cherry picked from commit 19d16aa941baa6b6bdd397029471edb7fea6e190)
This commit is contained in:
Justin Chadwell 2023-01-09 18:09:06 +00:00 committed by Tonis Tiigi
parent fd3fb752d3
commit fe6f697205
No known key found for this signature in database
GPG Key ID: AFA9DE5F8AB7AF39

View File

@ -278,6 +278,7 @@ func (l *loader) scanSBOM(ctx context.Context, fetcher remotes.Fetcher, r *resul
as.sbom = &sbomStub{ as.sbom = &sbomStub{
SPDX: dt, SPDX: dt,
} }
break
} }
} }
} }
@ -308,6 +309,7 @@ func (l *loader) scanProvenance(ctx context.Context, fetcher remotes.Fetcher, r
as.slsa = &slsaStub{ as.slsa = &slsaStub{
Provenance: dt, Provenance: dt,
} }
break
} }
} }
} }