ci: use full SHAs for github action versions

Ref: https://github.com/expressjs/security-wg/issues/2
This commit is contained in:
Phillip9587 2025-03-26 15:43:11 +01:00 committed by Phillip Barta
parent eb6d12587a
commit 7b44e1d850
4 changed files with 17 additions and 17 deletions

View File

@ -28,9 +28,9 @@ jobs:
name: Lint name: Lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with: with:
node-version: 'lts/*' node-version: 'lts/*'
@ -52,12 +52,12 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
persist-credentials: false persist-credentials: false
- name: Setup Node.js ${{ matrix.node-version }} - name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4 uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
@ -79,7 +79,7 @@ jobs:
run: npm run test-ci run: npm run test-ci
- name: Upload code coverage - name: Upload code coverage
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with: with:
name: coverage-node-${{ matrix.node-version }}-${{ matrix.os }} name: coverage-node-${{ matrix.node-version }}-${{ matrix.os }}
path: ./coverage/lcov.info path: ./coverage/lcov.info
@ -92,14 +92,14 @@ jobs:
contents: read contents: read
checks: write checks: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install lcov - name: Install lcov
shell: bash shell: bash
run: sudo apt-get -y install lcov run: sudo apt-get -y install lcov
- name: Collect coverage reports - name: Collect coverage reports
uses: actions/download-artifact@v4 uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with: with:
path: ./coverage path: ./coverage
pattern: coverage-node-* pattern: coverage-node-*
@ -109,6 +109,6 @@ jobs:
run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./lcov.info run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./lcov.info
- name: Upload coverage report - name: Upload coverage report
uses: coverallsapp/github-action@v2 uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with: with:
file: ./lcov.info file: ./lcov.info

View File

@ -34,7 +34,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL

View File

@ -36,12 +36,12 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
persist-credentials: false persist-credentials: false
- name: Setup Node.js ${{ matrix.node-version }} - name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4 uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
@ -63,7 +63,7 @@ jobs:
run: npm run test-ci run: npm run test-ci
- name: Upload code coverage - name: Upload code coverage
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with: with:
name: coverage-node-${{ matrix.node-version }}-${{ matrix.os }} name: coverage-node-${{ matrix.node-version }}-${{ matrix.os }}
path: ./coverage/lcov.info path: ./coverage/lcov.info
@ -76,14 +76,14 @@ jobs:
contents: read contents: read
checks: write checks: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install lcov - name: Install lcov
shell: bash shell: bash
run: sudo apt-get -y install lcov run: sudo apt-get -y install lcov
- name: Collect coverage reports - name: Collect coverage reports
uses: actions/download-artifact@v4 uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with: with:
path: ./coverage path: ./coverage
pattern: coverage-node-* pattern: coverage-node-*
@ -93,6 +93,6 @@ jobs:
run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./lcov.info run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./lcov.info
- name: Upload coverage report - name: Upload coverage report
uses: coverallsapp/github-action@v2 uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with: with:
file: ./lcov.info file: ./lcov.info

View File

@ -59,7 +59,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab. # format to the repository Actions tab.
- name: "Upload artifact" - name: "Upload artifact"
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with: with:
name: SARIF file name: SARIF file
path: results.sarif path: results.sarif
@ -69,4 +69,4 @@ jobs:
- name: "Upload to code-scanning" - name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11 uses: github/codeql-action/upload-sarif@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
with: with:
sarif_file: results.sarif sarif_file: results.sarif