Skip to content

Commit 7967724

Browse files
Merge branch 'docker:master' into 6203-add-healthcheck-format
2 parents 4c8f9eb + a6d013f commit 7967724

147 files changed

Lines changed: 2898 additions & 1623 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
6767
-
6868
name: Build
69-
uses: docker/bake-action@82490499d2e5613fcead7e128237ef0b0ea210f7 # v7
69+
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
7070
with:
7171
targets: ${{ matrix.target }}
7272
set: |
@@ -88,7 +88,7 @@ jobs:
8888
fi
8989
-
9090
name: Upload artifacts
91-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
91+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
9292
with:
9393
name: ${{ env.ARTIFACT_NAME }}
9494
path: /tmp/out/*
@@ -101,7 +101,7 @@ jobs:
101101
-
102102
name: Login to DockerHub
103103
if: github.event_name != 'pull_request'
104-
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4
104+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
105105
with:
106106
username: ${{ secrets.DOCKERHUB_CLIBIN_USERNAME }}
107107
password: ${{ secrets.DOCKERHUB_CLIBIN_TOKEN }}
@@ -125,7 +125,7 @@ jobs:
125125
type=semver,pattern={{major}}.{{minor}}
126126
-
127127
name: Build and push image
128-
uses: docker/bake-action@82490499d2e5613fcead7e128237ef0b0ea210f7 # v7
128+
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
129129
with:
130130
files: |
131131
./docker-bake.hcl
@@ -168,7 +168,7 @@ jobs:
168168
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
169169
-
170170
name: Build
171-
uses: docker/bake-action@82490499d2e5613fcead7e128237ef0b0ea210f7 # v7
171+
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
172172
with:
173173
targets: plugins-cross
174174
set: |

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ jobs:
6363
name: Update Go
6464
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
6565
with:
66-
go-version: "1.26.1"
66+
go-version: "1.26.3"
6767
cache: false
6868
-
6969
name: Initialize CodeQL
70-
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
70+
uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
7171
with:
7272
languages: go
7373
-
7474
name: Autobuild
75-
uses: github/codeql-action/autobuild@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
75+
uses: github/codeql-action/autobuild@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
7676
-
7777
name: Perform CodeQL Analysis
78-
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
78+
uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
7979
with:
8080
category: "/language:go"

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
3434
-
3535
name: Test
36-
uses: docker/bake-action@82490499d2e5613fcead7e128237ef0b0ea210f7 # v7
36+
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
3737
with:
3838
targets: test-coverage
3939
-
@@ -67,7 +67,7 @@ jobs:
6767
name: Set up Go
6868
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
6969
with:
70-
go-version: "1.26.1"
70+
go-version: "1.26.3"
7171
cache: false
7272
-
7373
name: Test
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: validate-milestone
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, milestoned, demilestoned, edited]
9+
10+
jobs:
11+
validate-milestone:
12+
runs-on: ubuntu-24.04
13+
timeout-minutes: 5
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
sparse-checkout: VERSION
19+
20+
- name: Validate milestone matches VERSION
21+
run: |
22+
expected=$(cat VERSION)
23+
milestone="${{ github.event.pull_request.milestone.title }}"
24+
25+
if [[ -z "$milestone" ]]; then
26+
echo "::error::PR must have a milestone set (expected: $expected)"
27+
exit 1
28+
fi
29+
30+
if [[ "$milestone" != "$expected" ]]; then
31+
echo "::error::Milestone '$milestone' does not match VERSION '$expected'"
32+
exit 1
33+
fi
34+
35+
echo "Milestone: $milestone ✓"

.github/workflows/validate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
steps:
3939
-
4040
name: Run
41-
uses: docker/bake-action@82490499d2e5613fcead7e128237ef0b0ea210f7 # v7
41+
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
4242
with:
4343
targets: ${{ matrix.target }}
4444

@@ -96,7 +96,7 @@ jobs:
9696
name: Set up Go
9797
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
9898
with:
99-
go-version: "1.26.1"
99+
go-version: "1.26.3"
100100
cache: false
101101
-
102102
name: Run gocompat check

.golangci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ run:
55
# which causes it to fallback to go1.17 semantics.
66
#
77
# TODO(thaJeztah): update "usetesting" settings to enable go1.24 features once our minimum version is go1.24
8-
go: "1.26.1"
8+
go: "1.26.3"
99

1010
timeout: 5m
1111

@@ -110,8 +110,15 @@ linters:
110110
excludes:
111111
- G104 # G104: Errors unhandled; (TODO: reduce unhandled errors, or explicitly ignore)
112112
- G115 # G115: integer overflow conversion; (TODO: verify these: https://github.com/docker/cli/issues/5584)
113+
- G117 # G117: Exported struct field matches secret pattern (false positives for legitimate field names)
114+
- G118 # G118: Goroutine uses context.Background/TODO while request-scoped context is available (TODO: evaluate these)
115+
- G122 # G122: Filesystem operation in filepath.Walk/WalkDir callback uses race-prone path (TODO: evaluate these)
113116
- G306 # G306: Expect WriteFile permissions to be 0600 or less (too restrictive; also flags "0o644" permissions)
114117
- G307 # G307: Deferring unsafe method "*os.File" on type "Close" (also EXC0008); (TODO: evaluate these and fix where needed: G307: Deferring unsafe method "*os.File" on type "Close")
118+
- G702 # G702: Command injection via taint analysis (TODO: evaluate these)
119+
- G703 # G703: Path traversal via taint analysis (TODO: evaluate these)
120+
- G704 # G704: SSRF via taint analysis (TODO: evaluate these)
121+
- G705 # G705: XSS via taint analysis (TODO: evaluate these)
115122

116123
govet:
117124
enable:

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ARG BASE_VARIANT=alpine
88
ARG ALPINE_VERSION=3.23
99
ARG BASE_DEBIAN_DISTRO=bookworm
1010

11-
ARG GO_VERSION=1.26.1
11+
ARG GO_VERSION=1.26.3
1212

1313
# XX_VERSION specifies the version of the xx utility to use.
1414
# It must be a valid tag in the docker.io/tonistiigi/xx image repository.
@@ -25,12 +25,12 @@ ARG GOTESTSUM_VERSION=v1.13.0
2525
# BUILDX_VERSION sets the version of buildx to use for the e2e tests.
2626
# It must be a tag in the docker.io/docker/buildx-bin image repository
2727
# on Docker Hub.
28-
ARG BUILDX_VERSION=0.31.1
28+
ARG BUILDX_VERSION=0.33.0
2929

3030
# COMPOSE_VERSION is the version of compose to install in the dev container.
3131
# It must be a tag in the docker.io/docker/compose-bin image repository
3232
# on Docker Hub.
33-
ARG COMPOSE_VERSION=v5.1.0
33+
ARG COMPOSE_VERSION=v5.1.3
3434

3535
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
3636

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
29.4.0-dev
1+
29.5.0

cli-plugins/hooks/template.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import (
1313
"github.com/spf13/cobra"
1414
)
1515

16+
const maxMessages = 10
17+
1618
func ParseTemplate(hookTemplate string, cmd *cobra.Command) ([]string, error) {
1719
out := hookTemplate
1820
if strings.Contains(hookTemplate, "{{") {
@@ -38,7 +40,10 @@ func ParseTemplate(hookTemplate string, cmd *cobra.Command) ([]string, error) {
3840
}
3941
out = b.String()
4042
}
41-
return strings.Split(out, "\n"), nil
43+
if n := strings.Count(out, "\n"); n > maxMessages {
44+
return nil, fmt.Errorf("hook template contains too many messages (%d): maximum is %d", n, maxMessages)
45+
}
46+
return strings.SplitN(out, "\n", maxMessages), nil
4247
}
4348

4449
var ErrHookTemplateParse = errors.New("failed to parse hook template")

cli-plugins/manager/manager_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,8 @@ func TestGetPluginDirs(t *testing.T) {
177177
pluginDirs := getPluginDirs(cli.ConfigFile())
178178
assert.Equal(t, strings.Join(expected, ":"), strings.Join(pluginDirs, ":"))
179179

180-
extras := []string{
181-
"foo", "bar", "baz",
182-
}
180+
extras := make([]string, 0, 3+len(expected))
181+
extras = append(extras, "foo", "bar", "baz")
183182
expected = append(extras, expected...)
184183
cli.SetConfigFile(&configfile.ConfigFile{
185184
CLIPluginsExtraDirs: extras,

0 commit comments

Comments
 (0)