Skip to content
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

Automated updates of base images #4033

Open
SgtCoDFish opened this issue May 19, 2021 · 31 comments
Open

Automated updates of base images #4033

SgtCoDFish opened this issue May 19, 2021 · 31 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@SgtCoDFish
Copy link
Member

SgtCoDFish commented May 19, 2021

If you were sent here from a reminder in #cert-manager-dev do the following:

  • Run make update-kind-images
  • Run make update-base-images

If anything was changed, create a PR for the changes to be merged


In #3740 an out-of-date base image resulted in a failed vulnerability scan. There likely wasn't any actual security issue, but the risk of ca-certificates and tzdata getting out of date in cert-manager containers that we distribute is non-trivial.

We should investigate how we can prevent this from happening again.

Discussions in the biweekly meeting on 19/05 included:

  • Switching to using a tag rather than a digest for base images (e.g. by changing this)
  • Embedding certs / tzdata into cert-manager binaries and using scratch over distroless as a base (this doesn't help on its own, but might accompany a different solution)
  • Adding automation to detect an out-of-date base image

/kind feature

@jetstack-bot jetstack-bot added the kind/feature Categorizes issue or PR as related to a new feature. label May 19, 2021
@munnerz
Copy link
Member

munnerz commented May 20, 2021

Switching to using a tag rather than a digest for base images:

My concern with this approach is that we then don't really know when the base image has changed. If there were some security issue that needed backporting, we'd then not (easily) be able to identify whether our base images in an older release series do contain the patch or not (without inspecting images directly). By using a digest, the action of upgrading the base image is explicit and version control will clearly indicate whether a release used a patched base image.

Adding automation to detect an out-of-date base image

I think this option makes a lot of sense - I wonder if initially, having automated CVE scanning (and alerts) would also suffice? Are we trying to detect security vulnerabilities, or out of date images? (or both?)

Would subscribing the mailing list to say, a release update stream for distroless suffice? (so we are notified when distroless releases a new image?)

@SgtCoDFish
Copy link
Member Author

By using a digest, the action of upgrading the base image is explicit and version control will clearly indicate whether a release used a patched base image.

I agree with this; in a vacuum I'd prefer to have the digest version recorded in source control. Switching to a tag would improve the situation immediately and easily, but I guess the likelihood is that using the tag would inevitably become long term in lieu of work towards automated checks.

a release update stream for distroless

I've had a quick look around and I can't find anything obvious provided by the distroless project for this, or else this would be a good stop-gap solution.

I think ultimately scanning is going to be a good thing to have both for finding out of date images and security issues. Either using ArtifactHub (#4032) or something like https://github.com/quay/clair

Now that I think about it, there's another aspect to this: out of date base images might be updated currently, but I suspect base image updates won't have been backported even to currently supported versions of cert-manager, e.g. #3741 wasn't backported to v1.1.

@munnerz
Copy link
Member

munnerz commented May 20, 2021 via email

@SgtCoDFish
Copy link
Member Author

Using a tag will make it very difficult to know whether a given release is safe for use/up to date is my concern

Yeah, I think I'll cross that off the list in the original post.

We could write a bot that runs say, nightly in...

This sounds like the approach to take long term 👍

In the short term, as a low tech approach, maybe it's worth me adding, say, a slack reminder to #cert-manager-dev every fortnight or so which just says:

Check base image versions, and respond to this comment with a 👍 when you've checked

with a link to this issue. That'll be an improvement we could make today, with almost zero engineering effort.

@SgtCoDFish
Copy link
Member Author

remind

I've set up the reminder as a low-tech stopgap.

@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 16, 2021
@SgtCoDFish
Copy link
Member Author

/remove-lifecycle stale

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 16, 2021
@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 15, 2021
@SgtCoDFish
Copy link
Member Author

/remove-lifecycle stale

This will be improved by #4554 but won't be completed by that. In any case, this should remain open.

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 15, 2021
@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 4, 2022
@SgtCoDFish
Copy link
Member Author

/remove-lifecycle stale

Still a TODO!

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 4, 2022
@SgtCoDFish
Copy link
Member Author

Bumping again... I feel like this is getting closer and it's definitely still just as important!

@SgtCoDFish SgtCoDFish added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Apr 28, 2022
@SgtCoDFish SgtCoDFish added this to the v1.9 milestone Apr 28, 2022
@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 10, 2023
@SgtCoDFish
Copy link
Member Author

/remove-lifecycle stale

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 10, 2023
@erikgb
Copy link
Contributor

erikgb commented Sep 8, 2023

Could it be an option to use Dependabot or Renovate to assist us here? From my experience, Renovate is more flexible - as it allows for markers in custom files, not supported natively by Renovate.

SgtCoDFish added a commit to SgtCoDFish/cert-manager that referenced this issue Oct 6, 2023
prompted by cert-manager#4033

Signed-off-by: Ashley Davis <ashley.davis@venafi.com>
SgtCoDFish added a commit to SgtCoDFish/cert-manager that referenced this issue Oct 6, 2023
prompted by cert-manager#4033

Signed-off-by: Ashley Davis <ashley.davis@venafi.com>
SgtCoDFish added a commit to SgtCoDFish/cert-manager that referenced this issue Oct 6, 2023
prompted by cert-manager#4033

Signed-off-by: Ashley Davis <ashley.davis@venafi.com>
kangsheng89 pushed a commit to kangsheng89/cert-manager that referenced this issue Dec 1, 2023
prompted by cert-manager#4033

Signed-off-by: Ashley Davis <ashley.davis@venafi.com>
@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 7, 2023
@jetstack-bot
Copy link
Collaborator

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle rotten
/remove-lifecycle stale

@jetstack-bot jetstack-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 6, 2024
@jetstack-bot
Copy link
Collaborator

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

@jetstack-bot
Copy link
Collaborator

@jetstack-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@SgtCoDFish
Copy link
Member Author

/remove-lifecycle rotten
/reopen

@jetstack-bot jetstack-bot reopened this Feb 5, 2024
@jetstack-bot
Copy link
Collaborator

@SgtCoDFish: Reopened this issue.

In response to this:

/remove-lifecycle rotten
/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jetstack-bot jetstack-bot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Feb 5, 2024
logand22 pushed a commit to gravitational/cert-manager that referenced this issue Mar 8, 2024
see cert-manager#4033

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
logand22 pushed a commit to gravitational/cert-manager that referenced this issue Mar 8, 2024
prompted by cert-manager#4033

Signed-off-by: Ashley Davis <ashley.davis@venafi.com>
@cert-manager-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
/lifecycle stale

@cert-manager-prow cert-manager-prow bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 5, 2024
@SgtCoDFish
Copy link
Member Author

/remove-lifecycle stale

@cert-manager-prow cert-manager-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

5 participants