From 256c398fb0a251d91e65cc7812de62cc69dcd606 Mon Sep 17 00:00:00 2001 From: Erik Meinders Date: Tue, 21 Jul 2026 20:08:28 +0200 Subject: [PATCH] ci: add CodeQL security and quality scanning Enable GitHub code scanning via CodeQL for the Python source. Runs on pushes to main/develop, PRs to main, and weekly. Uses the security-and-quality query suite to surface both security vulnerabilities and code-quality issues. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/codeql.yml | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 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 0000000..9ae0a93 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,42 @@ +name: CodeQL + +on: + push: + branches: + - main + - develop + pull_request: + branches: + - main + schedule: + - cron: "27 3 * * 1" # Weekly, Monday 03:27 UTC + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: + - python + + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + queries: security-and-quality + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}"