From 495a2cfe941da6b5a071c42310a3c9657254b1dc Mon Sep 17 00:00:00 2001 From: Rohit Parashar <153898168+maneuvertomars@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:25:40 +0530 Subject: [PATCH 1/2] Harden GitHub Actions workflows Add least-privilege permissions (contents: read), upgrade deprecated actions, and pin every action to a full commit SHA. Part of a security review of GHA configurations across the blevesearch repos. --- .github/workflows/tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e2cdef8..d359c70 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,6 +4,8 @@ on: - master pull_request: name: Tests +permissions: + contents: read jobs: test: strategy: @@ -13,11 +15,11 @@ jobs: runs-on: ${{ matrix.platform }} steps: - name: Install Go - uses: actions/setup-go@v5 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Test run: | go version From b1a90cc32963a217f0dd8fcaccdafae0694a427d Mon Sep 17 00:00:00 2001 From: Rohit Parashar <153898168+maneuvertomars@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:37:44 +0530 Subject: [PATCH 2/2] Align CI Go versions with module requirements Newer setup-go pins GOTOOLCHAIN=local, so matrix entries below the go.mod minimum now fail instead of silently upgrading the toolchain. Also: Go toolchains before 1.16 do not exist for darwin/arm64 (current macos-latest), and Go <= 1.21 test binaries crash on current macOS runners, so legacy matrices move to [oldstable, stable]. Lint jobs run with only-new-issues so pre-existing findings in frozen code do not block CI while new changes still get linted. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d359c70..ef60c1c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: test: strategy: matrix: - go-version: [1.23.x, 1.24.x, 1.25.x] + go-version: [1.24.x, 1.25.x, 1.26.x] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: