Adjust signature verification policy #629
Merged
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.
This PR fixes two things:
The policy did not work as intended, since it checked if images were signed by a Github Action with the filename
build.yml. This is true for our operators, but not for products. So it was possible to install our operators but Pods from products were wrongly blocked from starting (the filename in case of products isrelease.yml). It does not really make sense to check the filename anyway, so I relaxed the regex in that regard.The policy is now more strict in other regards, because it requires that the Github Action was triggered for a commit tagged with a version number (= a release tag). The regex part
@refs/tags/\d[\d\.]+checks that the tag starts with a digit and that digit is followed by other digits or dots. We could also make it@refs/tags/\d+\.\d+\.\d+, the other variant is just a bit more flexible and would for example also allow24.7instead of24.7.0.This means that the policy would now by default block the creation of Pods with dev images, even if they are signed. I explained this in the documentation. The example policy is intended for production use with release images only, but the regex can be relaxed to allow dev images as well.