diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e81a566879..9c596b8bf4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,21 +4,15 @@ # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. name: "CodeQL" - on: push: - branches: [master] + branches: [master, v2.dev, v3.dev] pull_request: # The branches below must be a subset of the branches above - branches: [master] + branches: [master, v2.dev, v3.dev] schedule: - cron: '0 0 * * 4' - -permissions: - actions: read - contents: read - pull-requests: read - security-events: write +permissions: read-all env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} @@ -28,6 +22,15 @@ jobs: analyze: name: Analyze runs-on: ubuntu-latest + permissions: + actions: read + contents: read + pull-requests: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [ actions, java ] steps: - name: Harden Runner uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 @@ -53,13 +56,29 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup Gradle uses: ./.github/actions/run-gradle + if: ${{ matrix.language == 'java' }} with: java: ${{ env.JAVA_VERSION }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - - name: Initialize CodeQL + - name: Initialize CodeQL (Actions) + uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 + if: ${{ matrix.language == 'actions' }} + with: + languages: actions + - name: Initialize CodeQL (Java) uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 + if: ${{ matrix.language == 'java' }} with: - languages: java + queries: +security-and-quality,security-extended,security-experimental + languages: java-kotlin + packs: > + +codeql/java-queries:., + githubsecuritylab/codeql-java-queries, + githubsecuritylab/codeql-java-extensions, + githubsecuritylab/codeql-java-library-sources, + githubsecuritylab/codeql-java-queries:suites/java-local.qls + config: | + threat-models: local - name: Autobuild uses: github/codeql-action/autobuild@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 - name: Perform CodeQL Analysis