Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Add a weekly scheduled dependency vulnerability scan

rcourtmanc7c42f87e414
diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml
new file mode 100644
index 0000000000..2c97c94be6
--- /dev/null
+++ b/.github/workflows/security-scan.yml
@@ -0,0 +1,60 @@
+name: Security Scan
+
+# Build and Test audits dependencies on every push, but a quiet week with no
+# pushes means no run — and newly disclosed vulnerabilities land against
+# unchanged code. This schedule is the backstop: it re-scans the Go module
+# (which has no push-time vulnerability gate at all) and the frontend
+# dependency graph against the current advisory databases. A failed scheduled
+# run emails the repository owner.
+on:
+ schedule:
+ - cron: '30 5 * * 1' # weekly, Monday 05:30 UTC, before the 06:00 triage run
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ govulncheck:
+ name: Go Vulnerability Scan
+ runs-on: ubuntu-24.04
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
+
+ - name: Set up Go
+ uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
+ with:
+ go-version-file: go.mod
+
+ - name: Install govulncheck
+ run: go install golang.org/x/vuln/cmd/[email protected]
+
+ - name: Scan Go module for reachable vulnerabilities
+ run: govulncheck ./...
+
+ npm-audit:
+ name: Frontend Dependency Audit
+ runs-on: ubuntu-24.04
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
+
+ - name: Set up Node.js
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
+ with:
+ node-version: '20'
+ cache: npm
+ cache-dependency-path: frontend-modern/package-lock.json
+
+ - name: Install frontend dependencies
+ working-directory: frontend-modern
+ run: npm ci
+
+ - name: Audit complete frontend dependency graph
+ working-directory: frontend-modern
+ run: npm audit
+
+ - name: Audit production frontend dependencies
+ working-directory: frontend-modern
+ run: npm audit --omit=dev