diff --git a/.github/workflows/codeql-verification.yml b/.github/workflows/codeql-verification.yml index 9622e797..57caf549 100644 --- a/.github/workflows/codeql-verification.yml +++ b/.github/workflows/codeql-verification.yml @@ -38,10 +38,10 @@ jobs: set -euo pipefail test -z "$(git status --porcelain)" git merge-base --is-ancestor eb6e43caaa32f8263fc33aa6044ff6d19f17e2f8 HEAD - grep -Fq 'VERSION_OVERRIDE: v0.13.36' .github/workflows/validate.yml + grep -Fq 'VERSION_OVERRIDE: v0.13.37' .github/workflows/validate.yml grep -Fq 'SHA256SUMS' scripts/package grep -Fq 'bash scripts/verify-package "$linux_asset"' .github/workflows/validate.yml - grep -Fq 'bash scripts/verify-package dist/artifacts/node-agent-0.13.36.tar.gz' .github/workflows/security-release-gate.yml + grep -Fq 'bash scripts/verify-package dist/artifacts/node-agent-0.13.37.tar.gz' .github/workflows/security-release-gate.yml - name: Install the release Go toolchain uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 @@ -68,7 +68,7 @@ jobs: export GOFLAGS=-mod=vendor mkdir -p "$GITHUB_WORKSPACE/bin" CGO_ENABLED=0 go build -trimpath -tags 'netgo osusergo' \ - -ldflags='-w -s -X main.VERSION=v0.13.36' \ + -ldflags='-w -s -X main.VERSION=v0.13.37' \ -o "$GITHUB_WORKSPACE/bin/node-agent" ./ - name: Analyze without publishing temporary alerts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 357212aa..69273398 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,11 +17,11 @@ jobs: env: GH_TOKEN: ${{ github.token }} PRODUCER_RUN: ${{ inputs.producer_run }} - RELEASE_TAG: v0.13.36 + RELEASE_TAG: v0.13.37 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - ref: v0.13.36 + ref: v0.13.37 fetch-depth: 0 persist-credentials: false - name: Verify immutable tag and successful producer @@ -47,7 +47,7 @@ jobs: gzip -dc dist/security-runtime/images.tar.gz | docker load printf '%s' "$GH_TOKEN" | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin trap 'docker logout ghcr.io >/dev/null 2>&1 || true' EXIT - source_image='pasturestack/node-agent:v0.13.36' + source_image='pasturestack/node-agent:v0.13.37' remote_image="ghcr.io/pasturestack/node-agent:$RELEASE_TAG" if docker manifest inspect "$remote_image" >/dev/null 2>"$RUNNER_TEMP/manifest-error"; then echo "Refusing to replace an existing immutable image tag: $remote_image" >&2; exit 1 diff --git a/.github/workflows/security-release-gate.yml b/.github/workflows/security-release-gate.yml index 3e3f849d..b937df64 100644 --- a/.github/workflows/security-release-gate.yml +++ b/.github/workflows/security-release-gate.yml @@ -19,9 +19,9 @@ jobs: timeout-minutes: 120 env: DAPPER_IMAGE: pasturestack/node-agent-dapper:${{ github.sha }} - RUNTIME_IMAGE: pasturestack/node-agent:v0.13.36 + RUNTIME_IMAGE: pasturestack/node-agent:v0.13.37 TRIVY_IMAGE: aquasec/trivy:0.74.0@sha256:62b1e65e8869bc4b4c6aa4fa2b21595256c7c2f6018a9d9ad61caf87187c1969 - VERSION_OVERRIDE: v0.13.36 + VERSION_OVERRIDE: v0.13.37 steps: - name: Check out candidate uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -69,26 +69,26 @@ jobs: set -euo pipefail CROSS=1 VERSION_OVERRIDE="$VERSION_OVERRIDE" make DAPPER_IMAGE="$DAPPER_IMAGE" ci CHECK_QUALIFIED_BACKPORTS=1 make DAPPER_IMAGE="$DAPPER_IMAGE" IMAGE_NAME=pasturestack/node-agent \ - TAG=v0.13.36 VERSION_OVERRIDE="$VERSION_OVERRIDE" package-image - test -s dist/artifacts/node-agent-0.13.36.tar.gz - test -s dist/artifacts/node-agent-0.13.36-windows-amd64.zip + TAG=v0.13.37 VERSION_OVERRIDE="$VERSION_OVERRIDE" package-image + test -s dist/artifacts/node-agent-0.13.37.tar.gz + test -s dist/artifacts/node-agent-0.13.37-windows-amd64.zip test "$(cat dist/image)" = "$RUNTIME_IMAGE" docker image inspect "$RUNTIME_IMAGE-backports" --format "{{.Id}}" >/dev/null - gzip -t dist/artifacts/node-agent-0.13.36.tar.gz - bash scripts/verify-package dist/artifacts/node-agent-0.13.36.tar.gz - unzip -t dist/artifacts/node-agent-0.13.36-windows-amd64.zip + gzip -t dist/artifacts/node-agent-0.13.37.tar.gz + bash scripts/verify-package dist/artifacts/node-agent-0.13.37.tar.gz + unzip -t dist/artifacts/node-agent-0.13.37-windows-amd64.zip ( cd dist/artifacts - sha256sum node-agent-0.13.36.tar.gz node-agent-0.13.36-windows-amd64.zip > SHA256SUMS + sha256sum node-agent-0.13.37.tar.gz node-agent-0.13.37-windows-amd64.zip > SHA256SUMS sha256sum -c SHA256SUMS ) - sha256sum dist/artifacts/node-agent-0.13.36.tar.gz \ - dist/artifacts/node-agent-0.13.36-windows-amd64.zip \ + sha256sum dist/artifacts/node-agent-0.13.37.tar.gz \ + dist/artifacts/node-agent-0.13.37-windows-amd64.zip \ bin/node-agent bin/windows/amd64/node-agent.exe > evidence/product-artifacts.sha256 docker image inspect "$RUNTIME_IMAGE" > evidence/runtime-image-inspect.json docker run --rm --entrypoint /usr/bin/node-agent "$RUNTIME_IMAGE" --version \ > evidence/runtime-version.txt - grep -Fxq 'node-agent version v0.13.36' evidence/runtime-version.txt + grep -Fxq 'node-agent version v0.13.37' evidence/runtime-version.txt - name: Verify reproducible Linux binary shell: bash @@ -124,7 +124,7 @@ jobs: trap 'rm -rf "$source_tree" "$product_tree"' EXIT git archive --format=tar HEAD | tar -xf - -C "$source_tree" cp bin/node-agent "$product_tree/node-agent" - unzip -p dist/artifacts/node-agent-0.13.36-windows-amd64.zip pasturestack/node-agent.exe > "$product_tree/node-agent.exe" + unzip -p dist/artifacts/node-agent-0.13.37-windows-amd64.zip pasturestack/node-agent.exe > "$product_tree/node-agent.exe" test -s "$product_tree/node-agent.exe" docker run --rm -v "$cache:/root/.cache/trivy" "$TRIVY_IMAGE" image --download-db-only docker run --rm -v "$source_tree:/scan:ro" -v "$PWD/evidence:/evidence" \ @@ -347,7 +347,7 @@ jobs: docker save "$RUNTIME_IMAGE" | gzip -n > dist/security-runtime/images.tar.gz cp evidence/runtime-security.json evidence/runtime-security.effective.json evidence/runtime.cdx.json dist/security-runtime/ tar -cf dist/security-runtime/ubuntu-backports-evidence.tar -C evidence ubuntu-backports ubuntu-backports-validation.json - cp dist/artifacts/node-agent-0.13.36.tar.gz dist/artifacts/node-agent-0.13.36-windows-amd64.zip dist/security-runtime/ + cp dist/artifacts/node-agent-0.13.37.tar.gz dist/artifacts/node-agent-0.13.37-windows-amd64.zip dist/security-runtime/ printf '%s\n' "$GITHUB_SHA" > dist/security-runtime/source-revision.txt (cd dist/security-runtime && sha256sum -- * > SHA256SUMS) - name: Upload exact runtime release bytes @@ -361,10 +361,10 @@ jobs: - name: Retain exact scanned release packages uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: node-agent-scanned-0.13.36 + name: node-agent-scanned-0.13.37 path: | - dist/artifacts/node-agent-0.13.36.tar.gz - dist/artifacts/node-agent-0.13.36-windows-amd64.zip + dist/artifacts/node-agent-0.13.37.tar.gz + dist/artifacts/node-agent-0.13.37-windows-amd64.zip dist/artifacts/SHA256SUMS if-no-files-found: error retention-days: 30 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 557d67d9..b1204eb8 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -52,7 +52,7 @@ jobs: id: package env: CROSS: "1" - VERSION_OVERRIDE: v0.13.36 + VERSION_OVERRIDE: v0.13.37 VALIDATION_SCOPE: ${{ inputs.validation_scope || 'full' }} run: | set -euo pipefail @@ -75,8 +75,8 @@ jobs: exit 1 ;; esac - linux_asset="dist/artifacts/node-agent-0.13.36.tar.gz" - windows_asset="dist/artifacts/node-agent-0.13.36-windows-amd64.zip" + linux_asset="dist/artifacts/node-agent-0.13.37.tar.gz" + windows_asset="dist/artifacts/node-agent-0.13.37-windows-amd64.zip" test -s "$linux_asset" test -s "$windows_asset" gzip -t "$linux_asset" @@ -92,8 +92,8 @@ jobs: ( cd dist/artifacts sha256sum \ - node-agent-0.13.36.tar.gz \ - node-agent-0.13.36-windows-amd64.zip >SHA256SUMS + node-agent-0.13.37.tar.gz \ + node-agent-0.13.37-windows-amd64.zip >SHA256SUMS sha256sum -c SHA256SUMS ) printf 'NODE_AGENT_VALIDATION_OK source=%s version=%s scope=%s artifacts=linux,windows\n' \ @@ -102,10 +102,10 @@ jobs: - name: Retain reviewed release candidate uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: node-agent-0.13.36 + name: node-agent-0.13.37 path: | - dist/artifacts/node-agent-0.13.36.tar.gz - dist/artifacts/node-agent-0.13.36-windows-amd64.zip + dist/artifacts/node-agent-0.13.37.tar.gz + dist/artifacts/node-agent-0.13.37-windows-amd64.zip dist/artifacts/SHA256SUMS if-no-files-found: error retention-days: 30 diff --git a/scripts/version b/scripts/version index 15662dce..cb6d8281 100755 --- a/scripts/version +++ b/scripts/version @@ -5,4 +5,4 @@ if [ -n "$VERSION_OVERRIDE" ]; then return 0 fi -VERSION=v0.13.36 +VERSION=v0.13.37 diff --git a/service/hostapilauncher/process_linux_test.go b/service/hostapilauncher/process_linux_test.go index 5407c07a..40a230df 100644 --- a/service/hostapilauncher/process_linux_test.go +++ b/service/hostapilauncher/process_linux_test.go @@ -19,7 +19,7 @@ func TestProducerIsBoundToLinuxParentDeathAndRejectsUnsafeExecutable(t *testing. } directory := t.TempDir() file := filepath.Join(directory, "host-api") - if err := os.WriteFile(file, []byte("#!/bin/sh\nprintf '0.38.9\\n'\n"), 0755); err != nil { + if err := os.WriteFile(file, []byte("#!/bin/sh\nprintf '0.38.10\\n'\n"), 0755); err != nil { t.Fatal(err) } if err := validateProducer(context.Background(), file, os.Environ()); err != nil { diff --git a/service/hostapilauncher/supervisor.go b/service/hostapilauncher/supervisor.go index 36882a53..892ca7ac 100644 --- a/service/hostapilauncher/supervisor.go +++ b/service/hostapilauncher/supervisor.go @@ -17,7 +17,7 @@ import ( "github.com/rancher/log" ) -const RequiredVersion = "0.38.9" +const RequiredVersion = "0.38.10" type Settings struct { Binary string diff --git a/service/hostapilauncher/supervisor_test.go b/service/hostapilauncher/supervisor_test.go index ec3ac680..03ab58e6 100644 --- a/service/hostapilauncher/supervisor_test.go +++ b/service/hostapilauncher/supervisor_test.go @@ -9,12 +9,12 @@ import ( ) func TestProducerVersionIsExactAndBounded(t *testing.T) { - for _, version := range []string{"0.38.9", "0.38.9\n"} { + for _, version := range []string{"0.38.10", "0.38.10\n"} { if !validVersion(version) { t.Fatal("current producer rejected") } } - for _, version := range []string{"0.38.4", "0.38.5", "0.38.6", "0.38.7", "0.38.8", "0.38.10", "0.39.0", "0.038.9", "v0.38.9", "0.38.9-dirty", "0.38.9\r\n", "0.38.9\nextra", "0.38.9\n0.38.9", ""} { + for _, version := range []string{"0.38.4", "0.38.5", "0.38.6", "0.38.7", "0.38.8", "0.38.9", "0.39.0", "0.038.10", "v0.38.10", "0.38.10-dirty", "0.38.10\r\n", "0.38.10\nextra", "0.38.10\n0.38.9", ""} { if validVersion(version) { t.Fatal("incompatible producer accepted") }