From a83d162e0ed36996a6be2928a4e36b315bc17bf1 Mon Sep 17 00:00:00 2001 From: Anne Beth Andersen <195699472+abla86@users.noreply.github.com> Date: Tue, 29 Sep 2026 20:59:45 +0200 Subject: [PATCH 1/2] 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) From f7f0d6ae49a171e490f4b079fe5b454c5b1f2ed8 Mon Sep 17 00:00:00 2001 From: Anne Beth Andersen <195699472+abla86@users.noreply.github.com> Date: Tue, 29 Sep 2026 21:15:17 +0200 Subject: [PATCH 2/2] fix: build before smoke test --- .github/workflows/security-guard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/security-guard.yml b/.github/workflows/security-guard.yml index 2ac2d31..ecf5b6b 100644 --- a/.github/workflows/security-guard.yml +++ b/.github/workflows/security-guard.yml @@ -23,6 +23,6 @@ jobs: 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" + npm test --if-present --prefix "$d" done < <(find . -name package.json -not -path '*/node_modules/*' -not -path './.git/*' -print)