Skip to content

Merge pull request #230 from El-swaggerito/main #42

Merge pull request #230 from El-swaggerito/main

Merge pull request #230 from El-swaggerito/main #42

Workflow file for this run

name: Security - Dependency Vulnerability Scanning
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# Weekly full audit every Monday at 08:00 UTC
- cron: '0 8 * * 1'
jobs:
npm-audit:
name: npm audit
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run npm audit (fail on critical/high)
run: npm audit --audit-level=high
- name: Generate full audit report (weekly)
if: github.event_name == 'schedule'
run: npm audit --json > audit-report.json || true
- name: Upload audit report
if: github.event_name == 'schedule'
uses: actions/upload-artifact@v7
with:
name: weekly-audit-report
path: audit-report.json
retention-days: 90