-
Notifications
You must be signed in to change notification settings - Fork 41
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
Incorporate apt upgrades for security updates #139
Comments
😕 Maybe we should create a ubuntu base image, which we rebuild without cache weekly, so we get weekly securitxy updates. Ubuntu base image is updates once a month or so. 🤔 |
@viceice would this rebuild without cache include running Is there any downside to running docker/docs#12571 Until renovate gains support for updating from APT repositories (this might not ever be feasible), then we are stuck with running |
even i add a |
we currently don't do any upgrade to suppress too may dupicated files, as docker would save all those new files the a new layer. so worst case it you fully duplicate the base layer |
BTW this affects both the base image as well as tools we install such as |
yes, we install latest version which is available at the day, when renovate updates the base image or we change some of our base files. |
Maybe we could inject a "week number" into our build files so that it invalidates the cached layers weekly? But we might also want the ability to manually trigger it somehow |
We need to add that value as |
For our images, we are using multi-stage builds with a single RUN command in the intermediate stage to avoid docker caching the |
Caching until now has been a desirable feature, not a bug.. |
what about weekly lockfile maintenance as fix release? 😏 |
There is another CVE (ReDoS in chalk/ansi-regex) detected in the renovate slim image, https://www.cve.org/CVERecord?id=CVE-2021-3807. I don't think it's likely to be a real problem for renovate though as renovate images not usually used in a public-facing environment. |
@wwuck Could you provide a small example of the multi-stage build with the single RUN that avoides docker caching? |
https://github.com/hadolint/hadolint/wiki/DL3009 Deleting I thought I remember reading somewhere that intermediate stages in a multi-stage build are not cached (I could be wrong here though)? In any case, I use multi-stage builds to prevent temporary build credentials from appearing in the final image layers. |
Hmmm, after some more reading, it looks like the only way to really avoid the cache (if you're not version pinning with https://docs.docker.com/engine/reference/builder/#run |
Posting this here since I see Renovate mentioned above (oh hi, @rarkins! 😬 ) and we're seeing dozens of mid-level vulnerabilities in renovate/renovate, which is based on this here image (cf. renovatebot/docker-renovate:Dockerfile).
Never mind, there are hardly any explicit package installs in Then again, it's containerbase/base:src/usr/local/bin/install-containerbase that would have to be annotated, right? 🤔 |
that would not help, as most vulnerabilities are not solved, so no upgrade at all. |
Ubuntu base images are only updated periodically, and may have vulnerabilities in packages which are fixed in the apt repository.
How can we balance such upgrading while also retaining some caching ability?
Example:
Meanwhile the same image with
RUN apt-get update && apt-get -y upgrade && rm -rf /var/lib/apt/lists/*
results in no vulnerabilities.Ref: https://pythonspeed.com/articles/security-updates-in-docker/
The text was updated successfully, but these errors were encountered: