Fix: Have the policy-tester library check policy result. #809
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
馃悰 The policy tester library blindly checked the errors, but with multiple authorities we might have errors, but still successfully evaluated the policy.
Here is the comment from the ~equivalent call to
ValidatePolicy(
fromvalidator.go
for comparison:... with this I was able to successfully run the policy tester using a policy that had a separate authority for SLSA
v0.2
andv1
predicate types without it failing./kind bug
Release Note
The policy tester library now properly treats authorities as an
OR
instead of erroring if any of them surface errors.Documentation