From 92c623ab54529c9e6e76300036c7af72f47d2b79 Mon Sep 17 00:00:00 2001 From: Meredith Lancaster Date: Tue, 26 Nov 2024 13:38:09 -0700 Subject: [PATCH] var naming Signed-off-by: Meredith Lancaster --- pkg/cmd/attestation/verification/policy.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/cmd/attestation/verification/policy.go b/pkg/cmd/attestation/verification/policy.go index 845b0a207..b5d641688 100644 --- a/pkg/cmd/attestation/verification/policy.go +++ b/pkg/cmd/attestation/verification/policy.go @@ -51,34 +51,34 @@ func (c EnforcementCriteria) Valid() error { } func (c EnforcementCriteria) BuildPolicyInformation() string { - template := + policyInfo := fmt.Sprintf(` The following policy criteria will be enforced against all attestations: - Predicate type must match %s`, c.PredicateType) if c.Certificate.RunnerEnvironment == GitHubRunner { runnerInfo := "\n- Attestation must have been generated by an Action workflow executed in a GitHub hosted runner" - template += runnerInfo + policyInfo += runnerInfo } ownerUriInfo := fmt.Sprintf("\n- Source Repository Owner URI must match %s", c.Certificate.SourceRepositoryOwnerURI) - template += ownerUriInfo + policyInfo += ownerUriInfo if c.Certificate.SourceRepositoryURI != "" { repoUriInfo := fmt.Sprintf("\n- Source Repository URI must match %s", c.Certificate.SourceRepositoryURI) - template += repoUriInfo + policyInfo += repoUriInfo } issuerInfo := fmt.Sprintf("\n- Signing certificate's OIDC issuer must match %s", c.Certificate.Issuer) - template += issuerInfo + policyInfo += issuerInfo if c.SAN != "" { sanInfo := fmt.Sprintf("\n- Signing certificate Subject Alternative Name must match %s", c.SAN) - template += sanInfo + policyInfo += sanInfo } else if c.SANRegex != "" { sanRegexInfo := fmt.Sprintf("\n- Signing certificate Subject Alternative Name must match the regex %s", c.SANRegex) - template += sanRegexInfo + policyInfo += sanRegexInfo } - return template + return policyInfo }