From dabd4c53ceb2653805ff61762815d71183de18e9 Mon Sep 17 00:00:00 2001 From: Tom Piccirello <8296030+Piccirello@users.noreply.github.com> Date: Wed, 7 Jan 2026 16:46:52 -0800 Subject: [PATCH] feat: add CodeQL Advanced workflow This is required to be able to run CodeQL against external contributors' PRs. --- .github/workflows/codeql.yml | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 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..97ca1ef4 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,45 @@ +name: 'CodeQL Advanced' + +on: + push: + branches: ['master'] + pull_request: + branches: ['master'] + schedule: + - cron: '32 13 * * 1' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: 'ubuntu-latest' + permissions: + security-events: write + # required to fetch internal or private CodeQL packs + packages: read + + strategy: + fail-fast: false + matrix: + include: + - language: actions + build-mode: none + - language: python + build-mode: none + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Initialize CodeQL + uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + # Disable TRAP caching - it creates a new cache per commit SHA which + # is never reused, causing wasted cache space. + # See: https://github.com/github/codeql-action/issues/2030 + trap-caching: false + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9 + with: + category: '/language:${{matrix.language}}'