From 119e529f91e59ff83826e789ae1badf67afc8448 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 13 Jul 2026 04:29:47 +0100 Subject: [PATCH] chore: add dependabot, dependency review, CodeQL, and security audit --- .github/dependabot.yml | 19 ++++++++++++++++++ .github/workflows/codeql.yml | 26 +++++++++++++++++++++++++ .github/workflows/dependency-review.yml | 16 +++++++++++++++ .github/workflows/security-audit.yml | 21 ++++++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/dependency-review.yml create mode 100644 .github/workflows/security-audit.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5dbba1a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,19 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: / + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + groups: + dev-dependencies: + dependency-type: development + patterns: + - "*" + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 3 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..635db30 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,26 @@ +name: CodeQL +on: + push: + branches: [master, main] + pull_request: + branches: [master, main] + schedule: + - cron: "0 6 * * 1" +permissions: + actions: read + contents: read + security-events: write +jobs: + analyze: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + language: [javascript-typescript] + steps: + - uses: actions/checkout@v4 + - uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + - uses: github/codeql-action/autobuild@v3 + - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 0000000..31037d7 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,16 @@ +name: Dependency review +on: + pull_request: + branches: [master, main] +permissions: + contents: read + pull-requests: write +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/dependency-review-action@v4 + with: + comment-summary-in-pr: always + fail-on-severity: high diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml new file mode 100644 index 0000000..a0bb8fc --- /dev/null +++ b/.github/workflows/security-audit.yml @@ -0,0 +1,21 @@ +name: Security audit +on: + schedule: + - cron: "0 7 * * 1-5" + workflow_dispatch: +permissions: + contents: read + security-events: write +jobs: + npm-audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "22" + cache: npm + - run: npm ci + - name: npm audit (high+) + run: npm audit --audit-level=high + continue-on-error: true