diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5296acc7..24b572d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,13 @@ jobs: name: CI runs-on: ubuntu-latest steps: + - name: Harden Runner + uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2 + with: + egress-policy: audit - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version-file: ".node-version" cache: "npm" @@ -26,7 +30,7 @@ jobs: - name: Test run: npm run test - name: Codecov - uses: codecov/codecov-action@e53489f4d376d79066609109e7a95a29eb3740b1 # v7.0.0 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 - name: Build run: npm run build - name: Upload artifacts @@ -43,9 +47,13 @@ jobs: permissions: contents: write steps: + - name: Harden Runner + uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2 + with: + egress-policy: audit - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version-file: ".node-version" cache: "npm" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a2ef1c9e..54c32c39 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -43,8 +43,12 @@ jobs: contents: read id-token: write # for npm provenance and trusted publishing steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + - name: Harden Runner + uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2 + with: + egress-policy: audit + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: # Node version is pinned in .node-version (shared by all workflows). # npm Trusted Publishing requires Node >=22.14 and npm >=11.5.1; diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ecda919e..885e6848 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,10 @@ jobs: runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' steps: + - name: Harden Runner + uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2 + with: + egress-policy: audit - name: Generate token id: generate-token uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 @@ -33,7 +37,7 @@ jobs: app-id: ${{ vars.GH_APP_ID }} private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 token: ${{ steps.generate-token.outputs.token }} @@ -43,7 +47,7 @@ jobs: git config --global user.email "${{ github.actor }}@users.noreply.github.com" git config --global pull.rebase false - name: Setup Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version-file: ".node-version" cache: "npm" diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 3c3b08f7..008455fd 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -22,6 +22,10 @@ jobs: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'chore/release-') steps: + - name: Harden Runner + uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2 + with: + egress-policy: audit - name: Generate token id: generate-token uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 @@ -29,7 +33,7 @@ jobs: app-id: ${{ vars.GH_APP_ID }} private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} - name: Checkout merge commit - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.event.pull_request.merge_commit_sha }} token: ${{ steps.generate-token.outputs.token }} diff --git a/.github/workflows/vrt.yml b/.github/workflows/vrt.yml index cc458232..90db8d56 100644 --- a/.github/workflows/vrt.yml +++ b/.github/workflows/vrt.yml @@ -17,8 +17,12 @@ jobs: name: VRT runs-on: ubuntu-latest steps: + - name: Harden Runner + uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2 + with: + egress-policy: audit - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: # Pin to the PR head SHA (immutable — won't drift on a mid-run force-push) # from its head repo, so fork PRs whose branch is named `main` don't @@ -34,7 +38,7 @@ jobs: env: BRANCH: ${{ github.head_ref || github.ref_name }} run: git checkout -B "$BRANCH" - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version-file: ".node-version" cache: "npm"