329d403e20
go1.21.9 (released 2024-04-03) includes a security fix to the net/http package, as well as bug fixes to the linker, and the go/types and net/http packages. See the [Go 1.21.9 milestone](https://github.com/golang/go/issues?q=milestone%3AGo1.21.9+label%3ACherryPickApproved) for more details. These minor releases include 1 security fixes following the security policy: - http2: close connections when receiving too many headers Maintaining HPACK state requires that we parse and process all HEADERS and CONTINUATION frames on a connection. When a request's headers exceed MaxHeaderBytes, we don't allocate memory to store the excess headers but we do parse them. This permits an attacker to cause an HTTP/2 endpoint to read arbitrary amounts of header data, all associated with a request which is going to be rejected. These headers can include Huffman-encoded data which is significantly more expensive for the receiver to decode than for an attacker to send. Set a limit on the amount of excess header frames we will process before closing a connection. Thanks to Bartek Nowotarski (https://nowotarski.info/) for reporting this issue. This is CVE-2023-45288 and Go issue https://go.dev/issue/65051. View the release notes for more information: https://go.dev/doc/devel/release#go1.22.2 - https://github.com/golang/go/issues?q=milestone%3AGo1.21.9+label%3ACherryPickApproved - full diff: https://github.com/golang/go/compare/go1.21.8...go1.21.9 Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
177 lines
4 KiB
YAML
177 lines
4 KiB
YAML
name: test
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- '[0-9]+.[0-9]+'
|
|
pull_request:
|
|
|
|
env:
|
|
GO_VERSION: "1.21.9"
|
|
GIT_PAGER: "cat"
|
|
PAGER: "cat"
|
|
|
|
jobs:
|
|
validate-dco:
|
|
uses: ./.github/workflows/.dco.yml
|
|
|
|
build-dev:
|
|
runs-on: ubuntu-20.04
|
|
needs:
|
|
- validate-dco
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
mode:
|
|
- ""
|
|
- systemd
|
|
steps:
|
|
-
|
|
name: Prepare
|
|
run: |
|
|
if [ "${{ matrix.mode }}" = "systemd" ]; then
|
|
echo "SYSTEMD=true" >> $GITHUB_ENV
|
|
fi
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
-
|
|
name: Build dev image
|
|
uses: docker/bake-action@v4
|
|
with:
|
|
targets: dev
|
|
set: |
|
|
*.cache-from=type=gha,scope=dev${{ matrix.mode }}
|
|
*.cache-to=type=gha,scope=dev${{ matrix.mode }},mode=max
|
|
*.output=type=cacheonly
|
|
|
|
test:
|
|
needs:
|
|
- build-dev
|
|
- validate-dco
|
|
uses: ./.github/workflows/.test.yml
|
|
secrets: inherit
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
storage:
|
|
- graphdriver
|
|
- snapshotter
|
|
with:
|
|
storage: ${{ matrix.storage }}
|
|
|
|
validate-prepare:
|
|
runs-on: ubuntu-20.04
|
|
needs:
|
|
- validate-dco
|
|
outputs:
|
|
matrix: ${{ steps.scripts.outputs.matrix }}
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Create matrix
|
|
id: scripts
|
|
run: |
|
|
scripts=$(cd ./hack/validate && jq -nc '$ARGS.positional - ["all", "default", "dco"] | map(select(test("[.]")|not)) + ["generate-files"]' --args *)
|
|
echo "matrix=$scripts" >> $GITHUB_OUTPUT
|
|
-
|
|
name: Show matrix
|
|
run: |
|
|
echo ${{ steps.scripts.outputs.matrix }}
|
|
|
|
validate:
|
|
runs-on: ubuntu-20.04
|
|
timeout-minutes: 120
|
|
needs:
|
|
- validate-prepare
|
|
- build-dev
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
script: ${{ fromJson(needs.validate-prepare.outputs.matrix) }}
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
-
|
|
name: Set up runner
|
|
uses: ./.github/actions/setup-runner
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
-
|
|
name: Build dev image
|
|
uses: docker/bake-action@v4
|
|
with:
|
|
targets: dev
|
|
set: |
|
|
dev.cache-from=type=gha,scope=dev
|
|
-
|
|
name: Validate
|
|
run: |
|
|
make -o build validate-${{ matrix.script }}
|
|
|
|
smoke-prepare:
|
|
runs-on: ubuntu-20.04
|
|
needs:
|
|
- validate-dco
|
|
outputs:
|
|
matrix: ${{ steps.platforms.outputs.matrix }}
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Create matrix
|
|
id: platforms
|
|
run: |
|
|
matrix="$(docker buildx bake binary-smoketest --print | jq -cr '.target."binary-smoketest".platforms')"
|
|
echo "matrix=$matrix" >> $GITHUB_OUTPUT
|
|
-
|
|
name: Show matrix
|
|
run: |
|
|
echo ${{ steps.platforms.outputs.matrix }}
|
|
|
|
smoke:
|
|
runs-on: ubuntu-20.04
|
|
needs:
|
|
- smoke-prepare
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: ${{ fromJson(needs.smoke-prepare.outputs.matrix) }}
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Prepare
|
|
run: |
|
|
platform=${{ matrix.platform }}
|
|
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
-
|
|
name: Test
|
|
uses: docker/bake-action@v4
|
|
with:
|
|
targets: binary-smoketest
|
|
set: |
|
|
*.platform=${{ matrix.platform }}
|