print policy information before verifying

Signed-off-by: Meredith Lancaster <malancas@github.com>
This commit is contained in:
Meredith Lancaster 2024-11-07 13:16:13 -07:00
parent 07e9a4a19d
commit c7e4411a88
2 changed files with 3 additions and 2 deletions

View file

@ -50,7 +50,7 @@ func (c EnforcementCriteria) Valid() error {
return nil
}
func (c EnforcementCriteria) PrintPolicyInformation() string {
func (c EnforcementCriteria) BuildPolicyInformation() string {
info := fmt.Sprintf(`
The following policy enforcement criteria will be checked against all attestations:
- Attestation predicate type must match %s

View file

@ -267,7 +267,8 @@ func runVerify(opts *Options) error {
}
attestations = filteredAttestations
opts.Logger.VerbosePrintf("Verifying attestations with predicate type: %s\n", ec.PredicateType)
// print information about the policy that will be enforced against attestations
opts.Logger.Printf(ec.BuildPolicyInformation())
sp, err := buildSigstoreVerifyPolicy(ec, *artifact)
if err != nil {