33 lines
1017 B
YAML
33 lines
1017 B
YAML
name: Supply-Chain-Scan (npm)
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "web/**/package.json"
|
|
- "web/**/package-lock.json"
|
|
pull_request: {}
|
|
|
|
jobs:
|
|
npm-audit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
- name: Alle Next.js-Frontends auf bekannte Schwachstellen pruefen
|
|
shell: bash
|
|
run: |
|
|
set -o pipefail
|
|
status=0
|
|
for pkg in $(find web -maxdepth 2 -name package.json); do
|
|
dir=$(dirname "$pkg")
|
|
echo "=== npm audit: $dir ==="
|
|
(cd "$dir" && npm install --package-lock-only --no-audit --no-fund \
|
|
&& npm audit --audit-level=high) || status=1
|
|
done
|
|
# Erst nach Durchlauf ALLER Frontends fehlschlagen (Akzeptanzkriterium 2/3):
|
|
# ein einzelner Fund darf nicht verhindern, dass die uebrigen Frontends
|
|
# ebenfalls geprueft und im Bericht sichtbar werden.
|
|
exit $status
|