From 4e0a18272590b2402dd5fa6454a7c15141ab3382 Mon Sep 17 00:00:00 2001 From: Rohit Parashar <153898168+maneuvertomars@users.noreply.github.com> Date: Wed, 29 Jul 2026 19:26:19 +0530 Subject: [PATCH] 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 1acdd98..5a92ac0 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