Skip to content

lifecycle/container: drop curl and runit - #24008

Merged
emilburzo merged 1 commit into
mainfrom
remove-curl-and-runit-from-docker
Jul 16, 2026
Merged

emilburzo merged 1 commit into
mainfrom
remove-curl-and-runit-from-docker

Conversation

@emilburzo

@emilburzo emilburzo commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Alternative to #23953

Differences:

  • it drops runit (by changing from chpst to setpriv), which no longer pulls in a lot of perl dependencies
  • it leaves perl-base installed since it's marked as an "essential" package in debian
  • since we are not breaking dpkg, we can just use apt-get purge to remove curl

The tradeoff is that we accept some perl-base CVEs (3 critical, 6 high), but leave dpkg/apt in a working state.

Numbers

Before:

 ✔ Scanned for vulnerabilities     [276 vulnerability matches]
   ├── by severity: 26 critical, 54 high, 60 medium, 5 low, 95 negligible (36 unknown)
   └── by status:   5 fixed, 271 not-fixed, 0 ignored

After:

 ✔ Scanned for vulnerabilities     [209 vulnerability matches]
   ├── by severity: 5 critical, 24 high, 52 medium, 5 low, 84 negligible (39 unknown)
   └── by status:   5 fixed, 204 not-fixed, 0 ignored

@emilburzo emilburzo self-assigned this Jul 14, 2026
@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 12e5bcb
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a55ed3b4ecbf000095bc3ac
😎 Deploy Preview https://deploy-preview-24008--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 12e5bcb
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a55ed3bf8889800088ff342
😎 Deploy Preview https://deploy-preview-24008--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 12e5bcb
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a55ed3b9460e400084cc3e4
😎 Deploy Preview https://deploy-preview-24008--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.24%. Comparing base (d2c63ec) to head (12e5bcb).
⚠️ Report is 20 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24008      +/-   ##
==========================================
- Coverage   93.26%   93.24%   -0.03%     
==========================================
  Files        1045     1045              
  Lines       61280    61280              
  Branches      424      424              
==========================================
- Hits        57155    57141      -14     
- Misses       4125     4139      +14     
Flag Coverage Δ
conformance 36.17% <ø> (+<0.01%) ⬆️
e2e 41.34% <ø> (+<0.01%) ⬆️
integration 32.10% <ø> (-0.49%) ⬇️
rust 0.00% <ø> (ø)
unit 92.39% <ø> (ø)
unit-migrate 92.43% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@github-actions

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-12e5bcbe2780b4770b678f37dcc9c9c3c8ea8b17
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

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-12e5bcbe2780b4770b678f37dcc9c9c3c8ea8b17

Afterwards, run the upgrade commands from the latest release notes.

@emilburzo
emilburzo marked this pull request as ready for review July 14, 2026 08:37
@emilburzo
emilburzo requested review from a team as code owners July 14, 2026 08:37
Copilot AI review requested due to automatic review settings July 14, 2026 08:37
Comment thread lifecycle/ak
chmod ug+rwx /data
chmod ug+rx /certs
exec chpst -u authentik:"${GROUP}" env HOME=/authentik $(run_authentik "$@")
exec setpriv --reuid authentik --regid authentik --init-groups -- env HOME=/authentik $(run_authentik "$@")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--init-groups replaces the need for the group discovery above (now removed), since it reads /etc/groups directly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces vulnerability surface area in the authentik server container image by removing runit and curl, and updates the container entrypoint to drop privileges using setpriv instead of chpst.

Changes:

  • Remove runit from the final runtime image and switch the entrypoint privilege drop from chpst to setpriv.
  • Purge curl/libcurl4t64 in the final runtime stage to lower reported CVEs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lifecycle/container/Dockerfile Stops installing runit and purges curl/libcurl4t64 in the final image layer.
lifecycle/ak Replaces chpst invocation with setpriv for running processes as the authentik user.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lifecycle/ak Resolved
@rissson

rissson commented Jul 14, 2026

Copy link
Copy Markdown
Member

We've previously added curl specifically because it's so useful for debugging. I don't really want to get rid of it.

@emilburzo
emilburzo merged commit 1c36f09 into main Jul 16, 2026
124 checks passed
@emilburzo
emilburzo deleted the remove-curl-and-runit-from-docker branch July 16, 2026 12:12
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Jul 16, 2026
@emilburzo emilburzo added backport/version-2026.2 Add this label to PRs to backport changes to version-2026.2 backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5 labels Jul 16, 2026
@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

⚠️ Cherry-pick to version-2026.2 has conflicts: #24113

@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.5 created: #24114

emilburzo added a commit that referenced this pull request Jul 16, 2026
…on-2026.5) (#24114)

lifecycle/container: drop curl and runit (#24008)

Co-authored-by: Emil Burzo <[email protected]>
emilburzo added a commit that referenced this pull request Jul 16, 2026
kensternberg-authentik added a commit that referenced this pull request Jul 18, 2026
…int/ak-progress

* web/typo/enterprise-status-card-properties: (41 commits)
  The language between licensed and isLicensed was confusing, so internally the progressBar expression uses 'allowed' for the number of licensed users, and 'licensed' for the overall state of the product.
  The severities ought to be in order, otherwise it's a mental pause.
  Another typo.
  Noticed a typo; prettier had an opinion.
  web/maint: clean-up ak-enterprise-status-card
  Some revisions to the enterprise status card.
  policies: make policy bindings expire-able (#24116)
  enterprise/endpoints/connectors/fleet: pass populate_policies (#24108)
  lifecycle/container: drop curl and runit (#24008)
  lib: move ExpiringModel to lib from core (#24109)
  web, docs, packages/*: Fix pnpm Workspace Catalogs (#23944)
  providers/oauth2: OpenID key binding support (#22590)
  core: bump github.com/go-ldap/ldap/v3 from 3.4.13 to 3.4.14 (#24088)
  core: bump uvicorn[standard] from 0.50.2 to 0.51.0 (#24089)
  core: bump coverage[toml] from 7.15.0 to 7.15.1 (#24090)
  core: bump uuid from 1.23.4 to 1.23.5 (#24091)
  core: bump json-subscriber from 0.2.8 to 0.3.0 (#24092)
  ci: bump softprops/action-gh-release from 3.0.1 to 3.0.2 (#24093)
  ci: bump actions/setup-node from 6.4.0 to 7.0.0 (#24094)
  ci: bump actions/setup-node from 6.4.0 to 7.0.0 in /.github/actions/setup (#24096)
  ...
@thmo

thmo commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Removing curl in a patch release is, from a container consumer's pov, unexpected.
It broke healthchecks in my setup (polling /-/health/ready/ for both, server and worker) and thus prevented proper container start.

@SCBionicle

Copy link
Copy Markdown

I agree. This should've been listed as breaking changes and possibly pushed to the minor release schedule rather being pushed as a patch.

@emilburzo

Copy link
Copy Markdown
Member Author

@thmo @SCBionicle sorry for the breakage, I was too eager to see the security improvements make it in the next patch release and I didn't consider people might be relying on curl as opposed to external health checks. lesson learned for the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2026.2 Add this label to PRs to backport changes to version-2026.2 backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants