Commit Graph

319 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
4212eb0abf Merge pull request #51650 from thaJeztah/bump_actions
gha: update actions/checkout@v6, actions/upload-artifact@v5, actions/download-artifact@v6
2025-12-02 21:28:40 +01:00
Sebastiaan van Stijn
81d930f527 gha: update to actions/setup-go@v6
Includes a change to use go.dev/dl instead of storage.googleapis.com/golang
as fallback URL, because storage.googleapis.com/golang is deprecated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-02 20:07:34 +01:00
Sebastiaan van Stijn
7000f92763 gha: update actions/download-artifact@v6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-02 20:03:48 +01:00
Sebastiaan van Stijn
69963d84f8 gha: update actions/upload-artifact@v5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-02 20:02:48 +01:00
Sebastiaan van Stijn
43ed81ed85 gha: update actions/checkout@v6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-02 20:01:27 +01:00
Paweł Gronowski
955650b33f gha/test-validate: Reuse the dev image
Don't build the dev image separately for each validation.

Build it once and then cache it so the validations can reuse it.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-28 16:26:29 +01:00
Paweł Gronowski
c74559df60 gha/validate: Actually dont fail fast
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-27 16:27:28 +01:00
Paweł Gronowski
ecf4446e46 gha/validate: Don't fail fast
Allow other validate checks to finish even if one of them failed.

Sometimes a check is faulty and its failure is expected - in such case
we want to ignore that one validation fail but still run all the others.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-27 16:13:15 +01:00
Cory Snider
517ae20be8 .github: collect all the OTEL traces
Jaeger does not make it easy to dump all the collected trace spans from
all services at once. Switch to using the OpenTelemetry Collector with
the OTLP File exporter which writes the traces straight to disk in a
format that Jaeger UI can natively consume.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-11-21 18:12:25 -05:00
Paweł Gronowski
922cd97491 update to go1.25.4
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-06 14:15:23 +01:00
Paweł Gronowski
d0fbae6e44 gha/vm: Force Lima v1.2.2
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-06 13:24:37 +01:00
Paweł Gronowski
52a917d48a gha/bin-image: Fix dco running on non-v tags
bin-image workflow was failing for the new docker tags
(`docker-v29.0.0-rc.2`) because it wasn't correctly picked up by the
condition that should filter out tags.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-05 15:00:54 +01:00
Paweł Gronowski
f8b9396c2c gha/labeler: Fix dependencies
Make sure that ALL (not ANY) conditions are satisfied

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-29 11:21:51 +01:00
Paweł Gronowski
4b22807a0f gha/labeler: Exclude client and api modules from dependencies label
Prevent applying `area/dependencies` when the `client` and `api` modules
are changed.

Due to the replace rule present for these modules, we have to revendor
them with each change which would trigger the previous rule.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-20 23:47:35 +02:00
Sebastiaan van Stijn
c5abafb459 Merge pull request #51186 from thaJeztah/deprecate_api_v1.43
daemon: raise default minimum API version to v1.44
2025-10-16 17:40:54 +02:00
Paweł Gronowski
acfe4e8613 gha: add support for docker-v* tags
ci(bin-image): strip prefix for bin-image tags

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-16 14:26:10 +02:00
Sebastiaan van Stijn
2c59be7011 daemon: raise default minimum API version to v1.44
- relates to 96b29f5a1f
- similar to 08e4e88482

The daemon currently provides support for API versions all the way back
to v1.24, which is the version of the API that shipped with docker 1.12.0
(released in 2016).

Such old versions of the client are rare, and supporting older API versions
has accumulated significant amounts of code to remain backward-compatible
(which is largely untested, and a "best-effort" at most).

This patch updates the minimum API version to v1.44, matching the minimum
version of the client, and matching the API version of docker v25.0, which
is the oldest supported version (through Mirantis MCR).

The intent is to start deprecating older API versions when daemons implementing
them reach EOL. This patch does not yet remove backward-compatibility code
for older API versions, and the DOCKER_MIN_API_VERSION environment variable
allows overriding the minimum version (to allow restoring the behavior from
before this patch), however, API versions below v1.44 should be considered
"best effort", and we may remove compatibility code to provide "degraded"
support.

With this patch the daemon defaults to API v1.44 as minimum:

    docker version
    Client:
     Version:           28.5.0
     API version:       1.51
     Go version:        go1.24.7
     Git commit:        887030f
     Built:             Thu Oct  2 14:54:39 2025
     OS/Arch:           linux/arm64
     Context:           default

    Server:
     Engine:
      Version:          dev
      API version:      1.52 (minimum version 1.44)
    ....

Trying to use an older version of the API produces an error:

    DOCKER_API_VERSION=1.43 docker version
    Client:
     Version:           28.5.0
     API version:       1.43 (downgraded from 1.51)
     Go version:        go1.24.7
     Git commit:        887030f
     Built:             Thu Oct  2 14:54:39 2025
     OS/Arch:           linux/arm64
     Context:           default
    Error response from daemon: client version 1.43 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version

To restore the previous minimum, users can start the daemon with the
DOCKER_MIN_API_VERSION environment variable set:

    DOCKER_MIN_API_VERSION=1.24 dockerd

API 1.24 is the oldest supported API version;

    docker version
    Client:
     Version:           28.5.0
     API version:       1.24 (downgraded from 1.51)
     Go version:        go1.24.7
     Git commit:        887030f
     Built:             Thu Oct  2 14:54:39 2025
     OS/Arch:           linux/arm64
     Context:           default

    Server:
     Engine:
      Version:          dev
      API version:      1.52 (minimum version 1.24)
    ....

When using the `DOCKER_MIN_API_VERSION` with a version of the API that
is not supported, an error is produced when starting the daemon;

    DOCKER_MIN_API_VERSION=1.23 dockerd --validate
    invalid DOCKER_MIN_API_VERSION: minimum supported API version is 1.24: 1.23

    DOCKER_MIN_API_VERSION=1.99 dockerd --validate
    invalid DOCKER_MIN_API_VERSION: maximum supported API version is 1.52: 1.99

Specifying a malformed API version also produces the same error;

    DOCKER_MIN_API_VERSION=hello dockerd --validate
    invalid DOCKER_MIN_API_VERSION: minimum supported API version is 1.24: hello

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-14 23:42:12 +02:00
Paweł Gronowski
1aa73144f2 update to go1.25.3
This release addresses breakage caused by a security patch included in
Go 1.25.2 and 1.24.8, which enforced overly restrictive validation on
the parsing of X.509 certificates. We've removed those restrictions
while maintaining the security fix that the initial release addressed.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-14 09:11:27 +02:00
Paweł Gronowski
b1e57881c3 gha/labeler: disable sync-labels to preserve human-added labels
The sync-labels option was causing the labeler action to remove labels
that were manually added by humans.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-13 15:27:07 +02:00
Sebastiaan van Stijn
28018a51d8 update to go1.25.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-11 20:14:22 +02:00
Paweł Gronowski
0ee0283c9d gha/labeler: Some more file-based rules
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-10 15:09:59 +02:00
Paweł Gronowski
0aed907a86 update to go1.24.8
This minor release includes 10 security fixes following the security policy:

- net/mail: excessive CPU consumption in ParseAddress

    The ParseAddress function constructed domain-literal address components through repeated string concatenation. When parsing large domain-literal components, this could cause excessive CPU consumption.

    Thanks to Philippe Antoine (Catena cyber) for reporting this issue.

    This is CVE-2025-61725 and Go issue https://go.dev/issue/75680.

- crypto/x509: quadratic complexity when checking name constraints

    Due to the design of the name constraint checking algorithm, the processing time
    of some inputs scales non-linearly with respect to the size of the certificate.

    This affects programs which validate arbitrary certificate chains.

    Thanks to Jakub Ciolek for reporting this issue.

    This is CVE-2025-58187 and Go issue https://go.dev/issue/75681.

- crypto/tls: ALPN negotiation errors can contain arbitrary text

    The crypto/tls conn.Handshake method returns an error on the server-side when
    ALPN negotation fails which can contain arbitrary attacker controlled
    information provided by the client-side of the connection which is not escaped.

    This affects programs which log these errors without any additional form of
    sanitization, and may allow injection of attacker controlled information into
    logs.

    Thanks to National Cyber Security Centre Finland for reporting this issue.

    This is CVE-2025-58189 and Go issue https://go.dev/issue/75652.

- encoding/pem: quadratic complexity when parsing some invalid inputs

    Due to the design of the PEM parsing function, the processing time for some
    inputs scales non-linearly with respect to the size of the input.

    This affects programs which parse untrusted PEM inputs.

    Thanks to Jakub Ciolek for reporting this issue.

    This is CVE-2025-61723 and Go issue https://go.dev/issue/75676.

- net/url: insufficient validation of bracketed IPv6 hostnames

    The Parse function permitted values other than IPv6 addresses to be included in square brackets within the host component of a URL. RFC 3986 permits IPv6 addresses to be included within the host component, enclosed within square brackets. For example: "http://[::1]/". IPv4 addresses and hostnames must not appear within square brackets. Parse did not enforce this requirement.

    Thanks to Enze Wang, Jingcheng Yang and Zehui Miao of Tsinghua University for reporting this issue.

    This is CVE-2025-47912 and Go issue https://go.dev/issue/75678.

- encoding/asn1: pre-allocating memory when parsing DER payload can cause memory exhaustion

    When parsing DER payloads, memories were being allocated prior to fully validating the payloads.
    This permits an attacker to craft a big empty DER payload to cause memory exhaustion in functions such as asn1.Unmarshal, x509.ParseCertificateRequest, and ocsp.ParseResponse.

    Thanks to Jakub Ciolek for reporting this issue.

    This is CVE-2025-58185 and Go issue https://go.dev/issue/75671.

- net/http: lack of limit when parsing cookies can cause memory exhaustion

    Despite HTTP headers having a default limit of 1 MB, the number of cookies that can be parsed did not have a limit.
    By sending a lot of very small cookies such as "a=;", an attacker can make an HTTP server allocate a large amount of structs, causing large memory consumption.

    net/http now limits the number of cookies accepted to 3000, which can be adjusted using the httpcookiemaxnum GODEBUG option.

    Thanks to jub0bs for reporting this issue.

    This is CVE-2025-58186 and Go issue https://go.dev/issue/75672.

- crypto/x509: panic when validating certificates with DSA public keys

    Validating certificate chains which contain DSA public keys can cause programs
    to panic, due to a interface cast that assumes they implement the Equal method.

    This affects programs which validate arbitrary certificate chains.

    Thanks to Jakub Ciolek for reporting this issue.

    This is CVE-2025-58188 and Go issue https://go.dev/issue/75675.

- archive/tar: unbounded allocation when parsing GNU sparse map

    tar.Reader did not set a maximum size on the number of sparse region data blocks in GNU tar pax 1.0 sparse files. A maliciously-crafted archive containing a large number of sparse regions could cause a Reader to read an unbounded amount of data from the archive into memory. When reading from a compressed source, a small compressed input could result in large allocations.

    Thanks to Harshit Gupta (Mr HAX) - https://www.linkedin.com/in/iam-harshit-gupta/ for reporting this issue.

    This is CVE-2025-58183 and Go issue https://go.dev/issue/75677.

- net/textproto: excessive CPU consumption in Reader.ReadResponse

    The Reader.ReadResponse function constructed a response string through
    repeated string concatenation of lines. When the number of lines in a response is large,
    this could cause excessive CPU consumption.

    Thanks to Jakub Ciolek for reporting this issue.

    This is CVE-2025-61724 and Go issue https://go.dev/issue/75716.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-07 15:49:36 -05:00
CrazyMax
dbcbe87d52 ci: fix cache for go modules
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-10-07 16:29:10 +02:00
CrazyMax
1d3687aeee ci: update gha cache attributes
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-10-07 10:12:22 +02:00
Sebastiaan van Stijn
033a52fbd5 Merge pull request #50931 from vvoland/gha-label-modules
gha: Add automatic PR labeling for modules
2025-09-17 13:26:57 +02:00
Paweł Gronowski
b70c1a439d gha: add missing dependency to Windows workflows
The Windows test workflow jobs were missing the dependency on the
`validate-dco` job so they ran regardless whether the DCO check passed
or not.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-16 11:50:09 +02:00
Paweł Gronowski
bdd0a2a970 gha: extract vm test to a separate workflow
`vm` is quite lengthy which makes it impossible to restart other failed
(flaky) jobs from the `test` workflow before the `vm` finishes.

This patch moves it to a separate workflow to allow retrying other jobs
independently.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-09 17:34:25 +02:00
Paweł Gronowski
9d2e74d43d gha: Add automatic PR labeling for modules
Sets up the labeler workflow to automatically label PRs affecting the
`client` and `api` modules.

This allows to distinguish PRs targetting different modules.

TODO: Figure out how to handle PRs that would end up with both labels.
However, I think it's good to see what PRs would that affect.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-08 22:36:45 +02:00
Sebastiaan van Stijn
aaa9dd4e26 gha: skip "vm" checks if ci/validate-only label is set
commit f0c069ffc9 added support for a
`ci/validate-only` label to skip tests and only run the validation checks.
Commit 09ecd74cf3 was merged later, but was
authored before that feature was merged, so did not account for the label,
so the "vm" checks would always run.

This applies the additional conditions to skip the "vm" checks if the
`ci/validate-only` label is set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 22:21:19 +02:00
Paweł Gronowski
ac2d830587 Merge pull request #50889 from vvoland/update-go
update to go1.24.7
2025-09-03 22:18:06 +02:00
Paweł Gronowski
30406d42e3 update to go1.24.7
This includes 1 security fix:

- net/http: CrossOriginProtection bypass patterns are over-broad

    When passing patterns to CrossOriginProtection.AddInsecureBypassPattern,
    requests that would have redirected to those patterns (e.g. without a trailing
    slash) were also exempted, which might be unexpected.

    Thanks to Marco Gazerro for reporting this issue.

    This is CVE-2025-47910 and Go issue https://go.dev/issue/75054.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.24.7

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-03 20:31:17 +02:00
Paweł Gronowski
8031b077bc gha/arm64: Setup qemu
Make it possible to build non-native images like the other
test-integration workflows

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-02 12:12:28 +02:00
Akihiro Suda
09ecd74cf3 CI: add oraclelinux-8 for running tests with cgroup v1
Lima is used for running a VM of `template://oraclelinux-8`.

My initial attempt was to use almalinux-8, but some port forwarding tests
do not seem to work on almalinux-8.

https://lima-vm.io/docs/examples/gha/

Fix issue 49576

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-08-29 19:04:07 +09:00
Sebastiaan van Stijn
47f869557a Merge pull request #50731 from vvoland/gha-validate-only
gha: Add conditional skip for jobs with 'ci/validate-only' label
2025-08-14 20:09:14 +02:00
Paweł Gronowski
f0c069ffc9 gha: Add conditional skip for jobs with 'ci/validate-only' label
This change adds conditional logic to skip build and test jobs when a
pull request is labeled with 'ci/validate-only'.

The `govulncheck` job in the CI workflow is intentionally excluded from
this conditional logic, ensuring security vulnerability checks always
run regardless of the label.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-08-14 14:21:38 +02:00
Paweł Gronowski
97587945ef .github/workflows: Add kind label validation to PR workflow
The PR validation workflow now enforces that every PR with an 'impact/*'
label must also have a corresponding 'kind/*' label, in addition to the
existing 'area/*' label requirement.

This change helps ensure proper categorization of pull requests by
requiring contributors to specify both the impact area and the kind of
change being made.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-08-14 12:47:03 +02:00
Derek McGowan
8700bca2bf Update migration test to use graphdriver env
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-08-08 12:07:42 -07:00
Austin Vazquez
b25b421f97 update to go1.24.6
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-07 17:14:22 -05:00
Derek McGowan
65867642d3 Remove go module workarounds
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:49:02 -07:00
Rob Murray
1a504f68fd Add nftables+firewalld tests to CI
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-07-21 11:36:32 +01:00
Paweł Gronowski
c1b95c0ca2 ci/windows: Always run tests with c8d
Remove the special condition needed to run Windows integration tests
with the containerd integration enabled in addition to the graphdriver.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-07-16 18:04:31 +02:00
Rob Murray
178416334f Run CI tests with nftables
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-07-10 19:53:15 +01:00
Paweł Gronowski
0a047e825c update to go1.24.5
- https://github.com/golang/go/issues?q=milestone%3AGo1.24.5+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.24.4...go1.24.5

This minor releases include 1 security fixes following the security policy:

- cmd/go: unexpected command execution in untrusted VCS repositories

    Various uses of the Go toolchain in untrusted VCS repositories can result in
    unexpected code execution. When using the Go toolchain in directories fetched
    using various VCS tools (such as directly cloning Git or Mercurial repositories)
    can cause the toolchain to execute unexpected commands, if said directory
    contains multiple VCS configuration metadata (such as a '.hg' directory in a Git
    repository). This is due to how the Go toolchain attempts to resolve which VCS
    is being used in order to embed build information in binaries and determine
    module versions.

    The toolchain will now abort attempting to resolve which VCS is being used if it
    detects multiple VCS configuration metadata in a module directory or nested VCS
    configuration metadata (such as a '.git' directoy in a parent directory and a
    '.hg' directory in a child directory). This will not prevent the toolchain from
    building modules, but will result in binaries omitting VCS related build
    information.

    If this behavior is expected by the user, the old behavior can be re-enabled by
    setting GODEBUG=allowmultiplevcs=1. This should only be done in trusted
    repositories.

    Thanks to RyotaK (https://ryotak.net) of GMO Flatt Security Inc for reporting
    this issue.

    This is CVE-2025-4674 and https://go.dev/issue/74380.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.24.5

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-07-08 19:21:37 +02:00
Sebastiaan van Stijn
963e7e6595 Merge pull request #50179 from thaJeztah/windows_updates
gha: update to windows 2022 / 2025
2025-07-08 15:28:23 +02:00
Sebastiaan van Stijn
fa4f3c979f gha: remove GO_VERSION build-arg from builds
The same env-var is used for action/setup-go as for overriding
the default Go version in Dockerfiles, however action/setup-go
only accepts SemVer (e.g. 1.25.0-rc.1) whereas the official golang
image follows the Go project's versioning, which doesn't use
a SemVer-compatible format (go1.25rc1 / 1.25rc1).

Trying to use the same "GO_VERSION" value for both will therefore
fail.

As we're already updating the default version in the Dockerfile to
the version we want to use, let's remove the --build-arg, and use
the default that's set in the Dockerfile.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-02 22:31:39 +02:00
Paweł Gronowski
d72f219a11 gha/bin-image: update tags comment
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-25 16:50:44 +02:00
Paweł Gronowski
38b98bcf68 gha/bin-image: add major and minor version image tags
Adding image tags that follow the semver major and minor versions (e.g., `28`
and `28.3`) for the moby-bin images.

This makes it easier for users to reference the latest build within a
major or minor version series without having to know the exact
minor/patch version.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-24 23:30:58 +02:00
Paweł Gronowski
dc14a75b24 Merge pull request #50177 from thaJeztah/tweak_timeouts
gha: lower timeouts on "build" and "merge" steps
2025-06-20 14:28:21 +00:00
Sebastiaan van Stijn
ce31bf3f0b gha: dco: bump alpine to 3.22
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-16 16:03:17 +02:00
Sebastiaan van Stijn
9316396db0 gha: run windows 2025 on PRs, 2022 scheduled
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-12 21:19:03 +02:00