Skip to content

Remove Semgrep requirements file and update CI workflow to run Semgre… #96

Remove Semgrep requirements file and update CI workflow to run Semgre…

Remove Semgrep requirements file and update CI workflow to run Semgre… #96

Workflow file for this run

name: Node.js CVE Scanning

Check failure on line 1 in .github/workflows/cve-scanning.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cve-scanning.yml

Invalid workflow file

(Line: 46, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.OSS_INDEX_USERNAME != '' && secrets.OSS_INDEX_TOKEN != ''
on:
pull_request:
paths:
- "**/package.json"
- "**/package-lock.json"
- ".github/workflows/cve-scanning.yml"
push:
branches: [main]
paths:
- "**/package.json"
- "**/package-lock.json"
- ".github/workflows/cve-scanning.yml"
schedule:
# Run every day at 5am and 5pm
- cron: "0 5,17 * * *"
permissions:
contents: read
jobs:
audit:
runs-on: ubuntu-latest
# setup-node cache: npm needs Actions cache write (and read via the same token scope)
permissions:
contents: read
actions: write
strategy:
matrix:
node-version: [24.x]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- name: NPM security audit
run: npm audit --audit-level=high
# OSS Index requires a free account + token since auth enforcement (Sonatype).
# Repo secrets: OSS_INDEX_USERNAME, OSS_INDEX_TOKEN — https://ossindex.sonatype.org/
- name: Sonatype OSS Index audit
if: ${{ secrets.OSS_INDEX_USERNAME != '' && secrets.OSS_INDEX_TOKEN != '' }}
run: npx --yes auditjs ossi -u "${{ secrets.OSS_INDEX_USERNAME }}" -p "${{ secrets.OSS_INDEX_TOKEN }}"