diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e044747..865371b 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -251,6 +251,21 @@ jobs: write-comment: true github-token: ${{ secrets.GITHUB_TOKEN }} + # GitHub rejects SARIF files where a single result carries more than + # 1000 relatedLocations, which Scout produces for widely-referenced OS + # packages — every upload had been silently failing on this since May + # ("rejecting SARIF, as there are more related locations per result than + # allowed"). Cap them so uploads flow and stale alerts can auto-close. + - name: Sanitize Scout SARIF (cap relatedLocations) + if: always() + continue-on-error: true + run: | + if [ -f scout-results.sarif ]; then + jq '(.runs[]?.results[]?) |= (if .relatedLocations then .relatedLocations |= .[:100] else . end)' \ + scout-results.sarif > scout-results.sanitized.sarif + mv scout-results.sanitized.sarif scout-results.sarif + fi + # Upload security scan results to GitHub Security tab - name: Upload Docker Scout scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v4 diff --git a/Dockerfile b/Dockerfile index fc2baad..bba3a44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ FROM debian:trixie-slim AS git-lfs-builder RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-recommends \ wget ca-certificates git make \ && rm -rf /var/lib/apt/lists/* -ARG GO_VERSION=1.25.9 +ARG GO_VERSION=1.25.12 ARG GIT_LFS_VERSION=3.7.1 RUN ARCH="$(dpkg --print-architecture)" \ && wget -qO /tmp/go.tar.gz "https://go.dev/dl/go${GO_VERSION}.linux-${ARCH}.tar.gz" \ @@ -44,6 +44,7 @@ ENV GOTOOLCHAIN=local RUN git clone --branch "v${GIT_LFS_VERSION}" --depth 1 https://github.com/git-lfs/git-lfs.git /tmp/git-lfs \ && cd /tmp/git-lfs \ && go get golang.org/x/crypto@latest \ + && go get golang.org/x/net@latest \ && go mod tidy \ && make \ && install -m 755 /tmp/git-lfs/bin/git-lfs /usr/local/bin/git-lfs