diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..b8cc17a --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,61 @@ +# CodeQL advanced setup. Replaces default-setup once disabled in repo settings. +# Advanced unlocks paths-ignore (skip generated proto stubs) and workflow pinning. +name: CodeQL + +on: + pull_request: + branches: [main] + paths-ignore: + - "sdk/src/opendecree/_generated/**" + - "**/*.md" + push: + branches: [main] + schedule: + - cron: "33 7 * * 1" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + security-events: write + packages: read + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: actions + build-mode: none + - language: python + build-mode: none + + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + persist-credentials: false + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + config: | + paths-ignore: + - sdk/src/opendecree/_generated/** + + - name: Analyze + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}"