diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..0cc4583 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,38 @@ +name: CodeQL + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + schedule: + # Weekly on Monday at 02:00 UTC, matching the previous default-setup cadence. + - cron: '0 2 * * 1' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + permissions: + security-events: write + contents: read + actions: read + strategy: + fail-fast: false + matrix: + language: [actions, python] + steps: + - uses: actions/checkout@v4 + + - uses: github/codeql-action/init@v4 + with: + languages: ${{ matrix.language }} + queries: default + + # autobuild is omitted: both 'python' and 'actions' are interpreted or + # declarative languages that require no compilation step; CodeQL indexes + # them directly without a build. + + - uses: github/codeql-action/analyze@v4 + with: + category: "/language:${{ matrix.language }}"