Node.js CVE Scanning #2822
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Node.js CVE Scanning | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize, ready_for_review] | |
| paths: | |
| - 'allow-list.json' | |
| - 'package.json' | |
| - 'toolbox/fdc3-workbench/package.json' | |
| - '.github/workflows/cve-scanning.yml' | |
| - 'website/package.json' | |
| # push: | |
| # paths: | |
| # - 'package.json' | |
| # - 'toolbox/fdc3-workbench/package.json' | |
| # - '.github/workflows/cve-scanning.yml' | |
| # - 'website/package.json' | |
| schedule: | |
| # Run every day at 5am and 5pm | |
| - cron: '0 5,17 * * *' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [24.18.0] | |
| steps: | |
| - name: Harden runner | |
| uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm install | |
| - run: npm install | |
| working-directory: toolbox/fdc3-workbench | |
| - run: npm install | |
| working-directory: website | |
| - name: Audit root dependencies | |
| run: npx --yes auditjs@latest guide --allowlist allow-list.json --token ${{ secrets.SONATYPE_GUIDE_TOKEN }} | |
| if: success() || failure() | |
| - name: Audit website dependencies | |
| run: npx --yes auditjs@latest guide --allowlist ../allow-list.json --token ${{ secrets.SONATYPE_GUIDE_TOKEN }} | |
| working-directory: website | |
| if: success() || failure() |