From 8ca1804c59a54fdfc264f29656b1543990dfa24b Mon Sep 17 00:00:00 2001 From: StepSecurity Bot Date: Fri, 25 Apr 2025 11:45:11 +0000 Subject: [PATCH] [StepSecurity] ci: Harden GitHub Actions --- .github/workflows/tests.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1af63c6..810f8af 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,15 +6,23 @@ on: pull_request: branches: [ main ] +permissions: + contents: read + jobs: run-tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 + with: + egress-policy: audit + + - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - name: Use Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2 with: node-version: '22' - name: Install dependencies