From 79727ce173304c439ff92f7131bda51bf89a7b03 Mon Sep 17 00:00:00 2001 From: Martin Oehlert Date: Fri, 10 Apr 2026 22:17:46 +0200 Subject: [PATCH 1/2] fix: add CodeQL workflow and restrict workflow permissions - Add custom CodeQL workflow with build-mode: none for java-kotlin to fix compilation failure in default setup - Add explicit permissions (contents: read) to both workflows to resolve CodeQL alert #3 (CWE-275) --- .github/workflows/codeql.yml | 49 ++++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 3 +++ 2 files changed, 52 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 0000000..cb0a7f0 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,49 @@ +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + - cron: '0 6 * * 1' # Monday 6 AM UTC + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ${{ (matrix.language == 'csharp' && 'windows-latest') || 'ubuntu-latest' }} + permissions: + security-events: write + + strategy: + fail-fast: false + matrix: + include: + - language: actions + build-mode: none + - language: csharp + build-mode: none + - language: java-kotlin + build-mode: none + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7210160..effb4dc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,6 +8,9 @@ on: branches: - master +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From 97b670f1c2cf095a62b993861b2bae77d11523b2 Mon Sep 17 00:00:00 2001 From: Martin Oehlert Date: Fri, 10 Apr 2026 22:26:16 +0200 Subject: [PATCH 2/2] fix: update CodeQL actions to v4 and drop java-kotlin - Update github/codeql-action from v3 to v4 - Remove java-kotlin from matrix since build-mode: none is not supported for compiled languages and the IntelliJ Platform dependencies cannot be resolved in CodeQL's environment --- .github/workflows/codeql.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index cb0a7f0..13daf02 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -30,20 +30,18 @@ jobs: build-mode: none - language: csharp build-mode: none - - language: java-kotlin - build-mode: none steps: - name: Checkout uses: actions/checkout@v4 - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 with: category: "/language:${{ matrix.language }}"