From 643e96b7b1097eb7e96ec094e28da57ae6ad36bf Mon Sep 17 00:00:00 2001 From: Avgustin Marinov Date: Wed, 15 Apr 2026 16:01:23 +0300 Subject: [PATCH] Add explicit codeql workflow (#3019) Signed-off-by: Avgustin Marinov --- .github/workflows/codeql.yaml | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/codeql.yaml diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml new file mode 100644 index 000000000..c4f7fb466 --- /dev/null +++ b/.github/workflows/codeql.yaml @@ -0,0 +1,58 @@ +name: "CodeQL Advanced" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: '15 18 * * 3' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + permissions: + # required for all workflows + security-events: write + # required to fetch internal or private CodeQL packs +# packages: read + # only required for workflows in private repositories +# actions: read +# contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: actions + build-mode: none + - language: java-kotlin + build-mode: manual + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Java 21 + if: matrix.language == 'java-kotlin' + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '21' + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - name: Build with Maven + if: matrix.build-mode == 'manual' + shell: bash + run: mvn install -DskipTests + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 + with: + category: "/language:${{matrix.language}}"