diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 46cf89a5..58972bab 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -22,6 +22,16 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Disable CodeQL Default Setup + # Advanced Setup (this workflow) and Default Setup cannot run simultaneously. + # This step switches Default Setup to not-configured so SARIF upload succeeds. + env: + GH_TOKEN: ${{ github.token }} + run: | + gh api repos/${{ github.repository }}/code-scanning/default-setup \ + -X PATCH \ + -f state=not-configured || true + - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: