From eca65ad43975febaa772fb83dbf9af774a4b63ac Mon Sep 17 00:00:00 2001 From: Rohit Parashar <153898168+maneuvertomars@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:25:28 +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 568f548..b344447 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@v1 + 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 d3d3c024c7f2e664a656dbe10d2723782cc4a2c9 Mon Sep 17 00:00:00 2001 From: Rohit Parashar <153898168+maneuvertomars@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:37:40 +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 b344447..a0fe533 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: test: strategy: matrix: - go-version: [1.21.x, 1.22.x, 1.23.x] + go-version: [oldstable, stable] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: