From 07d97c6053639aa1c3151d5591f35059007a04b4 Mon Sep 17 00:00:00 2001 From: Joe Stuart Date: Sun, 5 Nov 2023 19:43:13 -0600 Subject: [PATCH] only make the vsa available. having it in the output isnt necessary now --- internal/image/validate.go | 3 --- internal/output/output.go | 27 +++++++++++++-------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/internal/image/validate.go b/internal/image/validate.go index c63d29a1b..db60a6c67 100644 --- a/internal/image/validate.go +++ b/internal/image/validate.go @@ -118,9 +118,6 @@ func ValidateImage(ctx context.Context, comp app.SnapshotComponent, p policy.Pol } allResults = append(allResults, results...) out.Data = append(out.Data, data) - out.Vsa = append(out.Vsa, - attestation.VsaFromImageValidation(time.Now().String(), results, e.GetPolicySources(), p, a.Attestations()), - ) } out.PolicyInput = inputJSON diff --git a/internal/output/output.go b/internal/output/output.go index deed83c24..6d00805e4 100644 --- a/internal/output/output.go +++ b/internal/output/output.go @@ -75,20 +75,19 @@ func (v VerificationStatus) addToSuccesses(successes []evaluator.Result) []evalu // Output is a struct representing checks and exit code. type Output struct { - ImageAccessibleCheck VerificationStatus `json:"imageAccessibleCheck"` - ImageSignatureCheck VerificationStatus `json:"imageSignatureCheck"` - AttestationSignatureCheck VerificationStatus `json:"attestationSignatureCheck"` - AttestationSyntaxCheck VerificationStatus `json:"attestationSyntaxCheck"` - PolicyCheck []evaluator.Outcome `json:"policyCheck"` - ExitCode int `json:"-"` - Signatures []signature.EntitySignature `json:"signatures,omitempty"` - Attestations []attestation.Attestation `json:"attestations,omitempty"` - ImageURL string `json:"-"` - Detailed bool `json:"-"` - Data []evaluator.Data `json:"-"` - Policy policy.Policy `json:"-"` - PolicyInput []byte `json:"-"` - Vsa []attestation.ProvenanceStatementVSA `json:"vsa"` + ImageAccessibleCheck VerificationStatus `json:"imageAccessibleCheck"` + ImageSignatureCheck VerificationStatus `json:"imageSignatureCheck"` + AttestationSignatureCheck VerificationStatus `json:"attestationSignatureCheck"` + AttestationSyntaxCheck VerificationStatus `json:"attestationSyntaxCheck"` + PolicyCheck []evaluator.Outcome `json:"policyCheck"` + ExitCode int `json:"-"` + Signatures []signature.EntitySignature `json:"signatures,omitempty"` + Attestations []attestation.Attestation `json:"attestations,omitempty"` + ImageURL string `json:"-"` + Detailed bool `json:"-"` + Data []evaluator.Data `json:"-"` + Policy policy.Policy `json:"-"` + PolicyInput []byte `json:"-"` } // SetImageAccessibleCheck sets the passed and result.message fields of the ImageAccessibleCheck to the given values.