Skip to content

1.5.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 10:24
· 21 commits to master since this release
3cccbc6

Run containers as a dedicated user, safely: securityContext for dc-docker.yml, a hardened agent file system, strict config parsing, and every open dependency CVE closed.

Upgrade notes (read before rolling out)

  • Unknown or duplicate keys in dc-docker.yml are now errors (#75). A typo such as readOnly: or readOnlyRootFilesysem: used to be ignored silently, which turned a protection off. After upgrading, run DOCKER_CHECK for every service: each stray key is listed with its path and the closest known name.
  • name in dc-docker.yml must be a docker container name ([a-zA-Z0-9][a-zA-Z0-9_.-]*). Any other name already failed docker run --name=.
  • TEMP_DIR must be on a path only root can change. A sticky /tmp is fine. The agent refuses an unsafe TEMP_DIR before extracting anything.
  • New agent parameter CONTAINER_RUNTIME (podman by default, or docker). It only matters for securityContext.passwdEntry. Set docker on hosts with real Docker before using it; the agent refuses a mismatch with docker --version.
  • save-artifact: the x-dc-agent-file-extension header must be a plain extension (e.g. tar.gz). A missing or blank header still falls back to the configured extension.

Containers as a user (securityContext)

  • runAsUser / runAsGroup → --user U:G
  • readOnlyRootFilesystem → --read-only
  • allowPrivilegeEscalation: false → --security-opt no-new-privileges
  • directoryOrCreate volumes get owner (runAs or {user, group}) and mode. These are applied behind a write-path preflight that checks every path the root agent writes, for CHECK and PUSH alike (#74).
  • passwdEntry gives a UID that is not in the image a passwd entry, the way imagekit's runtime.passwd_entry does, so Java gets a real user.name and a writable user.home. Podman receives its own --passwd-entry; with docker the agent mounts a small generated container-passwd read-only over /etc/passwd. The host's /etc/passwd is never used.
  • tmpfs → --tmpfs <path>[:<options>], e.g. a writable /tmp under --read-only.

Security fixes

  • Local privilege escalation via a predictable work dir: tasks were extracted into /tmp/docker-<name>-<ms>, created non-exclusively, so a local user could pre-create it and swap dc-docker.yml or steer root's writes. The work dir is now created exclusively with mode 0700 and a random suffix, under a TEMP_DIR whose whole path is checked first.
  • Deleting trees no longer follows symbolic links (#76). On Linux the deletion goes through SecureDirectoryStream, relative to open directory descriptors.
  • save-artifact: the api-key is now checked before anything touches the disk; before, a request without a key made the root agent create arbitrary directories. The stored file must stay inside dir, and the header extension is validated.
  • Operator: HTML auto-escaping in the FreeMarker templates (reflected/stored XSS).
  • dc-docker.yml name can no longer place the service directory outside SERVICES_DEFINITION_DIR.

Dependencies

  • FreeMarker 2.3.35 (CVE-2026-84939), Jetty 12.1.13 (CVE-2026-19203, CVE-2026-19204), logback 1.6.4 (CVE-2026-19880), plus slf4j, jgit, guava, handlebars and snakeyaml-engine updates.
  • Docs site on pnpm 10 with minimumReleaseAge; all website dependency alerts closed.
  • Build: Maven 3.9.16 through a script-only wrapper with a checksum; surefire pinned. CI: CodeQL Action v4.

Full docs: https://evsinev.github.io/dc-agent/