From ba7a62d65a3446cd23e3182a4aa6e5c0045f8c55 Mon Sep 17 00:00:00 2001 From: Anne Beth Andersen <195699472+abla86@users.noreply.github.com> Date: Tue, 29 Sep 2026 21:00:42 +0200 Subject: [PATCH] ci: add automated security verification guard --- .github/workflows/security-guard.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/security-guard.yml diff --git a/.github/workflows/security-guard.yml b/.github/workflows/security-guard.yml new file mode 100644 index 0000000..2ac2d31 --- /dev/null +++ b/.github/workflows/security-guard.yml @@ -0,0 +1,28 @@ +name: Security Guard +on: + pull_request: + types: [opened, synchronize, reopened] + schedule: + - cron: "17 3 * * *" + workflow_dispatch: +permissions: + contents: read +jobs: + npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Verify npm projects + shell: bash + run: | + set -e + while IFS= read -r p; do + d="$(dirname "$p")" + npm install --ignore-scripts --no-audit --prefix "$d" + npm audit --audit-level=high --prefix "$d" + npm test --if-present --prefix "$d" + npm run build --if-present --prefix "$d" + done < <(find . -name package.json -not -path '*/node_modules/*' -not -path './.git/*' -print)