From 059e6c80a91bd334e12b16cf7ce403cbc90aa911 Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Thu, 19 Nov 2026 23:32:38 +0000 Subject: [PATCH 1/2] ci: pin actions and set token permissions Pin the actions used by the CI workflow, set the workflow token permissions and add a Dependabot configuration for the actions. Signed-off-by: Jon Ayers --- .github/dependabot.yml | 15 +++++++++++++++ .github/workflows/ci.yml | 25 ++++++++++++++++++------- 2 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..b9ed9dd1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# Set the configuration version. +version: 2 + +# Define the update configurations. +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + commit-message: + prefix: ci + groups: + github-actions: + patterns: + - '*' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 940a7af3..5401c5d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: branches: [main] pull_request: +# Set the token permissions. +permissions: + contents: read + # Define the workflow jobs. jobs: verification: @@ -15,9 +19,10 @@ jobs: if: github.event_name == 'pull_request' timeout-minutes: 5 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 + persist-credentials: false - name: "Perform commit verification" run: | # Determine the target commit range. @@ -31,8 +36,10 @@ jobs: runs-on: macos-15 timeout-minutes: 90 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: '1.27.4' - name: "Install sha256sum" @@ -52,8 +59,10 @@ jobs: matrix: goversion: ['1.26.11', '1.27.4'] steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ matrix.goversion }} - run: scripts/ci/setup_go.sh @@ -68,8 +77,10 @@ jobs: runs-on: windows-latest timeout-minutes: 60 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: '1.27.4' - run: scripts/ci/setup_go.sh From d3104273ac69436d90245c15cfbdd82dbce72e11 Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Thu, 19 Nov 2026 23:38:50 +0000 Subject: [PATCH 2/2] ci: build releases without a restored cache Signed-off-by: Jon Ayers --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed739d4f..0a2575ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -178,6 +178,7 @@ jobs: uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: '1.27.4' + cache: false - name: Install sha256sum run: brew install coreutils