Skip to content

Commit c47e8a8

Browse files
committed
Fix CodeQL workflow: trigger on main not master, bump to codeql-action v3/checkout v4, use build-mode none (Gradle needs JDK 25 so autobuild cannot compile)
1 parent 575a623 commit c47e8a8

1 file changed

Lines changed: 10 additions & 22 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ "master" ]
16+
branches: [ "main" ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ "master" ]
19+
branches: [ "main" ]
2020
schedule:
2121
- cron: '23 12 * * 3'
2222

@@ -40,38 +40,26 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444

4545
# Initializes the CodeQL tools for scanning.
46+
#
47+
# build-mode: none analyses the Java source directly without compiling it.
48+
# The Gradle build requires JDK 25, so CodeQL's autobuild cannot compile this
49+
# repository on the runner; source-only analysis avoids needing a build at all.
4650
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
51+
uses: github/codeql-action/init@v3
4852
with:
4953
languages: ${{ matrix.language }}
54+
build-mode: none
5055
# If you wish to specify custom queries, you can do so here or in a config file.
5156
# By default, queries listed here will override any specified in a config file.
5257
# Prefix the list here with "+" to use these queries and those in the config file.
5358

5459
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
5560
# queries: security-extended,security-and-quality
5661

57-
58-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
59-
# If this step fails, then you should remove it and run the build manually (see below)
60-
# name: Autobuild
61-
# uses: github/codeql-action/autobuild@v2
62-
63-
# ℹ️ Command-line programs to run using the OS shell.
64-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
65-
66-
# If the Autobuild fails above, remove it and uncomment the following three lines.
67-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
68-
69-
# - run: |
70-
# echo "Run, Build Application using script"
71-
# gradle clean build
72-
7362
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@v2
63+
uses: github/codeql-action/analyze@v3
7564
with:
7665
category: "/language:${{matrix.language}}"
77-

0 commit comments

Comments
 (0)