-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: optional image mutation in helm chart #944
Conversation
@microsoft-github-policy-service agree |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #944 +/- ##
==========================================
+ Coverage 56.87% 56.90% +0.02%
==========================================
Files 90 90
Lines 5269 5272 +3
==========================================
+ Hits 2997 3000 +3
Misses 1969 1969
Partials 303 303
☔ View full report in Codecov by Sentry. |
Thanks @mannbiher for the PR! We will discuss this PR at our next community call on 7/26 4:30pm PST (details on our README.md). We had not considered use cases where a tag should be preserved since from a security perspective, verifying supply chain artifacts (such as signatures) based on a tag which is mutable is not recommended. The application versioning of tags is a compelling scenario. |
Agree with @akashsinghal that verifying a tag is not a recommendation from the supply chain security's perspective. I am fine that having this optional image mutation setting for Ratify Helm Chart. But I would suggest there should be a |
Thanks for the discussion on the last community call @mannbiher! As discussed, I think we should a warning on the |
might be out of scope, wonder if we should let CLI verify command print out the warning if verifying against a tag? @akashsinghal |
@akashsinghal I have made the code change as requested. Could you please review and approve if changes look good? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Head branch was pushed to by a user without write access
Hi @akashsinghal Sorry, I had to amend my commit to add the signature. Could you please review and approve again. |
Description
Allow image mutation to be optional in helm chart. This change introduces one new property in helm chart under provider.
provider.enableMutation=true
When
provider.enableMutation
is set to false, it disables creation ofWhat this PR does / why we need it:
Current ratify helm chart allows image mutation by default. All image tags are replaced with image digest. This may not be desirable in some use cases. E.g. if there are OPA gatekeper constraints based on image tags or if the image tags reflects application revision.
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):Fixes #943
Type of change
Please delete options that are not relevant.
main
branch)How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration
helm template ratify .
from within the helm chart repository. Generated yaml is same as current yaml.helm template ratify . --set provider.enableMutation=false
from within helm repository. Mutation assign CRDs and ratify-mutation provider CRD are removed from generated template.Checklist:
Post Merge Requirements
Helm Chart Change