13665 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
bdc77c9706 Merge pull request #8607 from dokku/dependabot/docker/plugins/openresty-vhosts/dokku/openresty-docker-proxy-0.11.0
chore(deps): bump dokku/openresty-docker-proxy from 0.10.0 to 0.11.0 in /plugins/openresty-vhosts
2026-05-11 21:17:10 -04:00
Jose Diaz-Gonzalez
90e5903760 Merge pull request #8605 from dokku/dependabot/docker/docs/_build/python-3.15.0b1-alpine
chore(deps): bump python from 3.14.3-alpine to 3.15.0b1-alpine in /docs/_build
2026-05-11 21:16:10 -04:00
Jose Diaz-Gonzalez
d121eb982c Merge pull request #8604 from dokku/dependabot/docker/tests/apps/dockerfile-release/python-3.15.0b1-bookworm
chore(deps): bump python from 3.14.3-bookworm to 3.15.0b1-bookworm in /tests/apps/dockerfile-release
2026-05-11 21:16:03 -04:00
dependabot[bot]
2796733119 chore(deps): bump github.com/traefik/traefik/v2
Bumps [github.com/traefik/traefik/v2](https://github.com/traefik/traefik) from 2.11.45 to 2.11.46.
- [Release notes](https://github.com/traefik/traefik/releases)
- [Changelog](https://github.com/traefik/traefik/blob/v2.11.46/CHANGELOG.md)
- [Commits](https://github.com/traefik/traefik/compare/v2.11.45...v2.11.46)

---
updated-dependencies:
- dependency-name: github.com/traefik/traefik/v2
  dependency-version: 2.11.46
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-11 21:43:14 +00:00
dependabot[bot]
af614cd049 chore(deps): bump dokku/openresty-docker-proxy
Bumps dokku/openresty-docker-proxy from 0.10.0 to 0.11.0.

---
updated-dependencies:
- dependency-name: dokku/openresty-docker-proxy
  dependency-version: 0.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-11 21:42:13 +00:00
dependabot[bot]
194bfc6f12 chore(deps): bump python in /docs/_build
Bumps python from 3.14.3-alpine to 3.15.0b1-alpine.

---
updated-dependencies:
- dependency-name: python
  dependency-version: 3.15.0b1-alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-11 21:40:35 +00:00
dependabot[bot]
95b97defb7 chore(deps): bump python in /tests/apps/dockerfile-release
Bumps python from 3.14.3-bookworm to 3.15.0b1-bookworm.

---
updated-dependencies:
- dependency-name: python
  dependency-version: 3.15.0b1-bookworm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-11 21:40:34 +00:00
Jose Diaz-Gonzalez
b66df28d96 fix: harden scheduler-k3s cron manifests and dockerfile run startup
The cron-id label could exceed Kubernetes' 63-byte cap when commands or
schedules were long, and an all-digit job-suffix or cron-id rendered as
an unquoted YAML scalar caused the API server to reject manifests. Run
pods built from dockerfiles also occasionally hit the 10s startup wait
on a cold image pull, even though the pod was scheduled correctly.

The cron-id is now stored as an annotation and a shorter hash is used as
the selector label. Every interpolated annotation and label value in the
cron-job and deployment templates is now quoted to prevent numeric
coercion, and the run-pod wait timeout is raised to 30 seconds.
2026-05-11 14:49:58 -04:00
Jose Diaz-Gonzalez
d0588698f5 test: add scheduler-k3s run parity tests across builders
Extends bats coverage for the scheduler-k3s scheduler so that
herokuish and dockerfile builders match the cnb test surface for
`dokku run`, `dokku run:detached`, `dokku cron:run`, deployment
manifests, cronjob manifests, and Procfile-key resolution. Adds
the corresponding `app-cron-procfile.json` fixture for the python
app and `app-cron.json` / `app-cron-procfile.json` fixtures for
the dockerfile-procfile app.
2026-05-11 12:10:54 -04:00
Jose Diaz-Gonzalez
41afd7646e Merge pull request #8603 from cheif/feat/add-oauth-auth-plugin
Add `dokku-http-oauth` to community plugins
2026-05-11 11:46:44 -04:00
Dokku Bot
029e98673f Release 0.38.3
# History

## 0.38.3

Install/update via the bootstrap script:

```shell
wget -NP . https://dokku.com/install/v0.38.3/bootstrap.sh
sudo DOKKU_TAG=v0.38.3 bash bootstrap.sh
```

### Bug Fixes

- #8602: @josegonzalez Reject per-app sets for global-only proxy properties
- #8601: @josegonzalez Rename app-json:report flags to match property
- #8600: @josegonzalez Report info-flag should not error when app undeployed

### New Features

- #8599: @josegonzalez Add docker healthcheck to dokku container
v0.38.3
2026-05-11 08:04:48 +00:00
Dan Berglund
eb8316d3a8 Add dokku-http-oauth to community plugins 2026-05-11 08:49:17 +02:00
Jose Diaz-Gonzalez
f1e2f41bd9 fix: wait for terminal pod phase on scheduler-k3s run
After streaming logs from a run pod on scheduler-k3s, the apiserver may still report `PodRunning` for a short window due to kubelet status propagation lag, causing `dokku run` to fail with `Unable to attach as the pod is in an unknown state: Running`. Wait briefly for the pod to reach a terminal phase before classifying the outcome.
2026-05-11 02:38:20 -04:00
Jose Diaz-Gonzalez
59c1bef87b fix: stream logs for non-tty dokku run on scheduler-k3s
For short-lived commands the run pod can transition Running to Succeeded
between the running-pod check and the kubectl exec SPDY upgrade, leaving
the upgrade to fail with `container not found`. When stdout is not a TTY
(and DOKKU_FORCE_TTY is not set) the exec attach is only being used to
capture stdout, so stream the run pod logs in follow mode instead. The
pod's `TTLSecondsAfterFinished` of 60s keeps the kubelet's log file
readable for the duration of the call, eliminating the race.
2026-05-11 02:05:56 -04:00
Jose Diaz-Gonzalez
ff1296859b test: stabilize scheduler-k3s cnb bats tests
Drop the assertion that the web deployment has no command since the python buildpack auto-emits a web Procfile entry, which correctly routes through launcher just like docker-local. Shorten the cron command fixture so the base36-encoded cron-id stays under the 63-byte kubernetes label limit, and relax the `dokku run` and `dokku cron:run` output assertions to `assert_output_contains` so they tolerate the leading blank line emitted on k3s.
2026-05-11 02:05:56 -04:00
Jose Diaz-Gonzalez
3a845f4d14 fix: route CNB images through launcher on scheduler-k3s
Mirror the docker-local fix in #8525 for the k3s scheduler. CNB images default to a `/cnb/process/web` entrypoint that ignores incoming args, so non-web deployments, scheduled cron jobs, and ad-hoc `dokku run` / `cron:run` commands all need an explicit `launcher` entrypoint. The deployment and cron-job helm templates now set `command: [launcher]` when `image.type` is `pack`, and `TriggerSchedulerRun` sets the entrypoint to `launcher` for pack images while finishing the previously stubbed Procfile lookup branch so the resolved command is actually scheduled.
2026-05-11 02:05:56 -04:00
Jose Diaz-Gonzalez
3ddce21aef Merge pull request #8602 from dokku/8597-caddy-haproxy-traefik-accept-per-app-set-but-report-only-returns-global-value 2026-05-11 01:04:14 -04:00
Jose Diaz-Gonzalez
cdce68f8a2 Merge pull request #8601 from dokku/8598-app-json-set-appjson-path-succeeds-but-app-json-appjson-path-is-not-a-valid-report-flag
Rename app-json:report flags to match property
2026-05-10 23:58:05 -04:00
Jose Diaz-Gonzalez
74dc94bad2 Merge pull request #8599 from dokku/dokku-container-healthcheck
Add docker healthcheck to dokku container
2026-05-10 23:50:29 -04:00
Jose Diaz-Gonzalez
9123d14f3c Merge pull request #8600 from dokku/8596-report-subcommand-errors-with-not-deployed-when-probing-config-properties-before-deploy
Report info-flag should not error when app undeployed
2026-05-10 23:49:56 -04:00
Jose Diaz-Gonzalez
66eb1340f5 fix: install nginx catch-all default site in dokku container
Pre-seeds the `dokku/install_default_site` debconf answer to `true` so the dokku postinst installs `/etc/nginx/conf.d/00-default-vhost.conf` during image build. Without this, debconf returned an empty value in non-interactive docker builds, the postinst's `setup-default-site` short-circuited, and nginx had no listener on port 80 - which left the readiness sentinel untouched and the container stuck unhealthy.
2026-05-10 22:54:49 -04:00
Jose Diaz-Gonzalez
822b7dddcd fix: reject per-app sets for global-only proxy properties
`caddy:set`, `haproxy:set`, and `traefik:set` previously accepted per-app writes for properties that only have a single host-wide reader, so `:set myapp image foo:bar` printed a success message while `:report myapp` kept showing the global default. The per-app form is now rejected with `The key '<key>' can only be set globally`, matching the existing rejection used for haproxy `refresh-conf` and traefik `challenge-mode`. Caddy `tls-internal` remains the only legitimate per-app property in this family.
2026-05-10 22:42:57 -04:00
Jose Diaz-Gonzalez
4eee229bbc fix: rename app-json:report flags to match property
The property name set via `app-json:set` is `appjson-path`, but the matching read-back flags on `app-json:report` were named `--app-json-selected`, `--app-json-global-selected`, and `--app-json-computed-selected`. The mismatch meant `dokku app-json:report <app> --app-json-appjson-path` (the form already documented in deployment-tasks.md) was rejected as an invalid flag, and the `--format json` output advertised keys that did not correspond to any settable property. The flags and JSON keys are renamed to `--app-json-appjson-path`, `--app-json-global-appjson-path`, and `--app-json-computed-appjson-path` so that the property name round-trips through set and report.
2026-05-10 22:32:16 -04:00
Jose Diaz-Gonzalez
7b515ea129 refactor: drop unused value_exists from report functions
The `value_exists` variable in the report info-flag loop is no longer read after the `not deployed` failure was removed, and was already unused in domains, haproxy-vhosts, traefik-vhosts, caddy-vhosts, and openresty-vhosts. Drop the declaration and the trailing assignment so the loop reads cleanly across all plugins.
2026-05-10 22:23:46 -04:00
Jose Diaz-Gonzalez
bd748052a1 fix: report info-flag should not error when app undeployed
Several plugin `:report` subcommands erroneously failed with `not deployed` when an info-flag matched a property that was empty. Empty values are legitimate for configuration properties pre-deploy and the `--format json` path already returns them without error. Remove the `value_exists` check across nginx, checks, git, certs, scheduler-docker-local, and the builder-* plugins so the info-flag form behaves consistently with the JSON form.
2026-05-10 22:15:27 -04:00
Jose Diaz-Gonzalez
2c274217de chore: run shfmt 2026-05-10 21:42:35 -04:00
Jose Diaz-Gonzalez
2a4393a63a test: cover dokku container healthcheck wiring
Adds a bats lint test that guards the static wiring (nginx conf, dokku-restore finish-script ordering, my_init sentinel reset, and the Dockerfile HEALTHCHECK line) plus a docker smoke test that boots the built image, waits for the health flip, exercises the loopback endpoint, asserts the port is not published to the host, and verifies the negative path. The smoke test is invoked via a new `make test-image-healthcheck` target and runs automatically in the build-image action after `docker buildx --load`.
2026-05-10 21:39:43 -04:00
Jose Diaz-Gonzalez
cc0843391f feat: add docker healthcheck to dokku container
The official dokku/dokku image gains a HEALTHCHECK directive backed by a loopback-only HTTP endpoint at `127.0.0.1:18080/_dokku/health`. The endpoint reports 200 once first-boot bootstrap finishes, sshd and nginx are accepting connections, and `dokku ps:restore` completes; otherwise it returns 503. Changes are scoped to the Docker overlay and Dockerfile so debian-package installs are unaffected.
2026-05-10 21:17:09 -04:00
Dokku Bot
a553f04966 Release 0.38.2
# History

## 0.38.2

Install/update via the bootstrap script:

```shell
wget -NP . https://dokku.com/install/v0.38.2/bootstrap.sh
sudo DOKKU_TAG=v0.38.2 bash bootstrap.sh
```

### Security

- #8590: @josegonzalez Restrict app names to prevent command injection
- #8591: @josegonzalez Harden archive extraction against symlink traversal
- #8589: @josegonzalez Enforce 0600 permissions on .netrc credentials file
- #8588: @josegonzalez Sanitize openresty include filenames to prevent eval injection

### Bug Fixes

- #8593: @josegonzalez Gate ssl_reject_handshake behind nginx 1.19.4
- #8578: @josegonzalez Reference SOURCECODE_WORK_DIR in builder core-post-extract

### Documentation

- #8592: @josegonzalez Add security section to release changelog
- #8587: @vixalien Correct buildkit builder code block syntax
- #8580: @othercorey Set issue type in bug report template

### Tests

- #8586: @josegonzalez Count assert_output_contains matches as fixed strings
- #8581: @dependabot[bot] chore(deps): bump golang from 1.26.2 to 1.26.3 in /tests/apps/go-fail-predeploy
- #8582: @dependabot[bot] chore(deps): bump golang from 1.26.2 to 1.26.3 in /tests/apps/gogrpc
- #8584: @dependabot[bot] chore(deps): bump golang from 1.26.2 to 1.26.3 in /tests/apps/go-fail-postdeploy
- #8583: @dependabot[bot] chore(deps): bump golang from 1.26.2 to 1.26.3 in /tests/apps/zombies-dockerfile-tini
- #8585: @dependabot[bot] chore(deps): bump golang from 1.26.2 to 1.26.3 in /tests/apps/zombies-dockerfile-no-tini
- #8574: @dependabot[bot] chore(deps): bump node from 25-alpine to 26-alpine in /tests/apps/dockerfile-noexpose
- #8575: @dependabot[bot] chore(deps): bump node from 25-alpine to 26-alpine in /tests/apps/dockerfile-procfile-bad
- #8577: @dependabot[bot] chore(deps): bump node from 25-alpine to 26-alpine in /tests/apps/dockerfile-app-json-formations
- #8576: @dependabot[bot] chore(deps): bump node from 25-alpine to 26-alpine in /tests/apps/dockerfile
- #8573: @dependabot[bot] chore(deps): bump node from 25-alpine to 26-alpine in /tests/apps/dockerfile-procfile

### Dependencies

- #8579: @josegonzalez Use type prefix for dokku-bot dependency label
v0.38.2
2026-05-10 20:17:51 +00:00
Jose Diaz-Gonzalez
9adf6e5f36 Merge pull request #8593 from dokku/fix-debian-bullseye-ssl-reject-handshake 2026-05-10 16:16:16 -04:00
Jose Diaz-Gonzalez
235078f111 Merge pull request #8590 from dokku/command-injection-via-app-name 2026-05-10 15:29:35 -04:00
Jose Diaz-Gonzalez
392ac73d33 fix: gate ssl_reject_handshake behind nginx 1.19.4
The shipped catch-all default site uses `ssl_reject_handshake`, which is unsupported on nginx older than 1.19.4 and causes nginx to fail to start on Debian Bullseye. The postinst now detects the installed nginx version and installs an HTTP-only variant of the catch-all on older systems.
2026-05-09 16:32:30 -04:00
Jose Diaz-Gonzalez
4f4fed7101 test: update apps:rename assertions for quoted git-hook app name
The security fix that quoted `$APP` inside the pre-receive hook heredoc changed the literal hook contents from `dokku git-hook foo` to `dokku git-hook "foo"`, so the existing substring assertions no longer match.
2026-05-09 16:06:27 -04:00
Jose Diaz-Gonzalez
dbac12e9f1 refactor: route bash app name validation through go
The bash and go validators previously each kept their own copy of the regex, which had to be updated in lockstep. Both bash wrappers now invoke the existing common binary via the same pattern as `verify_app_name`, leaving go as the single source of truth. The legacy `IsValidAppNameOld` rule is also widened to allow underscores again so apps created under the old naming rules can still be looked up through `VerifyAppName`'s either-rule fallback.
2026-05-09 16:00:51 -04:00
Jose Diaz-Gonzalez
93f87a0f07 fix: restrict app names to prevent command injection
The previous app name validation regex permitted shell metacharacters such as `;`, `$`, backticks, `|`, and `&`. These names were embedded unquoted into the generated git pre-receive hook script, allowing an authenticated user to execute arbitrary commands as the dokku user simply by pushing to a remote with a crafted app name. App names are now restricted to lowercase alphanumerics, dots, and hyphens, and the hook script also quotes the app variable as a defense-in-depth measure.
2026-05-09 16:00:51 -04:00
Jose Diaz-Gonzalez
d00aaf3ff3 Merge pull request #8586 from dokku/assert-output-contains
Count assert_output_contains matches as fixed strings
2026-05-09 16:00:27 -04:00
Jose Diaz-Gonzalez
e78d3bcc78 Merge pull request #8591 from dokku/arbitrary-file-write
Harden archive extraction against symlink traversal
2026-05-09 15:58:31 -04:00
Jose Diaz-Gonzalez
33dd8005dd Merge pull request #8589 from dokku/netrc-permissions 2026-05-09 15:36:10 -04:00
Jose Diaz-Gonzalez
90aa64e7e3 Merge pull request #8588 from dokku/sanitize-openresty-filenames 2026-05-09 15:36:01 -04:00
Jose Diaz-Gonzalez
f4213a4bf5 tests: prevent assert_output_contains from aborting on no match
Bats runs tests under `set -eo pipefail`, so when `grep -F -o` finds nothing inside the count pipe it exits 1, the whole pipe fails, errexit fires, and the function aborts before reaching the count comparison. Wrap grep in `{ ... || true; }` so the pipe stays zero when the pattern is absent and the helper falls through to the flunk message.
2026-05-09 13:36:29 -04:00
Jose Diaz-Gonzalez
253d47ecf5 Merge pull request #8592 from dokku/security-section
Add security section to release changelog
2026-05-09 13:27:34 -04:00
Jose Diaz-Gonzalez
0b93488006 feat: add security section to release changelog 2026-05-09 13:19:33 -04:00
Jose Diaz-Gonzalez
9decf16ea1 feat: configure archive limits via git properties
Replaces the `DOKKU_ARCHIVE_MAX_SIZE` and `DOKKU_ARCHIVE_MAX_FILES` environment variables with global git properties (`archive-max-size` and `archive-max-files`), configurable via `dokku git:set --global` and surfaced through `dokku git:report --global`. Defaults remain `1073741824` bytes and `10000` entries.
2026-05-09 13:08:23 -04:00
Jose Diaz-Gonzalez
2df0791fcd fix: prevent tar symlink traversal in archive extraction
Archives passed to git:from-archive and certs:add were extracted without symlink or path validation, allowing a crafted archive to write arbitrary files anywhere writable by the dokku user via symlink traversal. Extraction now pre-scans entries for absolute paths, parent traversal, and unsafe symlinks, applies the GNU tar `--no-unsafe-links` flag when available, and validates symlinks after extraction.
2026-05-09 12:54:42 -04:00
Jose Diaz-Gonzalez
6eb8b8632c fix: enforce 0600 permissions on .netrc credentials file
The previous use of `touch` before `netrc set` allowed the file to inherit the umask and be world-readable, exposing stored git credentials to local users. The set and unset paths now explicitly chmod 0600 and chown to the dokku user, and the plugin install hook repairs permissions on already-affected installations.
2026-05-09 12:22:17 -04:00
Jose Diaz-Gonzalez
a70728f61e fix: sanitize openresty include filenames to prevent eval injection
Add defense-in-depth sanitization for OpenResty include files to prevent
OS command injection via malicious filenames that break shell quoting in eval.

- Add filename validation in core-post-extract using regex [^a-zA-Z0-9_.-]
- Validate both http-includes and location-includes paths
- Abort deploy via dokku_log_fail on unsafe filenames
- Skip non-regular files (symlinks, directories) during extraction
- Add security regression test with unsafe filename containing space
- Keep existing guards in docker-args-process-deploy as belt-and-suspenders
- Update documentation to clarify allowed filename characters

Addresses CVSS 9.9 vulnerability where filenames like poc'$(cmd)'x.conf
could escape shell quoting and execute arbitrary commands during deploy.
2026-05-09 12:20:50 -04:00
Jose Diaz-Gonzalez
25abd38387 tests: use /bin/bash -c to execute commands in init tests 2026-05-09 10:48:29 -04:00
Jose Diaz-Gonzalez
2974830e8f Merge pull request #8587 from vixalien/patch-1
Correct buildkit builder code block syntax
2026-05-09 10:45:42 -04:00
Angelo Verlain
2c3f29daca fox: correct buildkit builder code block syntax 2026-05-09 04:07:01 +02:00
Jose Diaz-Gonzalez
38de83eabf tests: use inverted assert
Also echo the status
2026-05-08 21:39:57 -04:00