From 3f75ff6e3682e9aaa53e16f888902dd6d8709e4b Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Sun, 12 Jul 2026 23:27:35 +0200 Subject: [PATCH] ci(security): add CodeQL SAST workflow (javascript-typescript) --- .github/workflows/codeql.yml | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..ccb1f0f6 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,48 @@ +name: CodeQL + +# Static application security testing for all TS/JS. Uses build-mode: none — no +# compile needed, which sidesteps the monorepo/native-module build entirely. +# Default (code-scanning) query suite; security-extended is deferred (triage tax). +# CodeQL uploads alerts to the Security tab but does NOT fail the PR by itself — +# blocking is a repo setting (code-scanning merge protection), documented in the +# maintainer checklist in docs/systems/security-scanning.md. + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: '27 3 * * 1' # weekly Monday 03:27 UTC + +permissions: + contents: read + +concurrency: + group: codeql-${{ github.ref }} + cancel-in-progress: true + +jobs: + analyze: + name: Analyze (javascript-typescript) + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write # upload SARIF to code scanning + actions: read + steps: + - name: Harden the runner + uses: step-security/harden-runner@v2 + with: + egress-policy: audit + - name: Checkout + uses: actions/checkout@v5 + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: javascript-typescript + build-mode: none + - name: Perform CodeQL analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:javascript-typescript"