diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml new file mode 100644 index 0000000..28b4a23 --- /dev/null +++ b/.github/workflows/security-audit.yml @@ -0,0 +1,48 @@ +name: Production dependency audit + +on: + pull_request: + branches: [main] + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: dhv2-production-audit-${{ github.ref }} + cancel-in-progress: true + +jobs: + api: + name: API · production dependencies + runs-on: ubuntu-latest + defaults: + run: + working-directory: api-v3 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '24' + cache: npm + cache-dependency-path: api-v3/package-lock.json + - name: Reject high/critical runtime advisories + run: npm audit --omit=dev --audit-level=high + + web: + name: WEB · production dependencies + runs-on: ubuntu-latest + defaults: + run: + working-directory: web-v2 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '24' + cache: npm + cache-dependency-path: web-v2/package-lock.json + - name: Reject high/critical runtime advisories + run: npm audit --omit=dev --audit-level=high