Repository navigation
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
cc5a966 to
1f95fc8
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #23953 +/- ##
==========================================
+ Coverage 93.15% 93.21% +0.06%
==========================================
Files 1037 1045 +8
Lines 60783 61207 +424
Branches 0 424 +424
==========================================
+ Hits 56621 57055 +434
+ Misses 4162 4152 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-1f95fc828052e56df940ea597b1db62b927f4d44
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-1f95fc828052e56df940ea597b1db62b927f4d44Afterwards, run the upgrade commands from the latest release notes. |
| chown authentik:authentik /certs /data /data/media /media /authentik/.ssh /ak-root | ||
| chown authentik:authentik /certs /data /data/media /media /authentik/.ssh /ak-root && \ | ||
| # remove runtime-unused packages until we have separate build/run images | ||
| dpkg --purge --force-remove-essential --force-depends \ |
There was a problem hiding this comment.
because it also removes runit, which we need for priv drop (chpst), until we find an alternative
the dependency chain is: runit -> sysuser-helper -> perl
There was a problem hiding this comment.
Pull request overview
This PR reduces the vulnerability footprint of the authentik runtime container image by removing build-time-only packages (notably curl and perl) from the final stage, aiming to lower reported CRITICAL/HIGH CVEs and shrink attack surface.
Changes:
- Adds a package-removal step in the final image build to purge
curl,libcurl, andperl-related packages after setup. - Keeps the runtime package install set focused on libraries needed for server operation and healthchecking.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # remove runtime-unused packages until we have separate build/run images | ||
| dpkg --purge --force-remove-essential --force-depends \ | ||
| curl libcurl4t64 perl perl-base perl-modules-5.40 libperl5.40 sysuser-helper |
There was a problem hiding this comment.
We can't use apt because it would also remove runit. It's a valid point but I'm not sure there's a good solution for it.
There was a problem hiding this comment.
Well, there is one alternative, we stop depending on chpst from runit, so nothing would pull in perl anymore.
|
Closing in favor of #24008 |
Reduces CRITICAL/HIGH vulnerabilities from 80 to 20:
Before
After:
Details
Container image security scanners like
grypeortrivyreport even CVEs which have no fixes, like these curl/perl ones:Since we only use these at build time, they should be removed from the runtime image (at least until we have separate build/runtime images), which also reduces the attack surface.