Skip to content

Commit 49f8e62

Browse files
committed
Add CodeQL
1 parent 16bf19e commit 49f8e62

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CodeQL
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: "29 13 * * 2" # weekly at 13:29 UTC on Tuesday
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
analyze:
18+
permissions:
19+
contents: read
20+
actions: read # for github/codeql-action/init to get workflow details
21+
security-events: write # for github/codeql-action/analyze to upload SARIF results
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
26+
- name: Set up Java 17
27+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
28+
with:
29+
distribution: temurin
30+
java-version: 17
31+
32+
- name: Set up gradle
33+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
34+
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
37+
with:
38+
languages: java, actions
39+
# using "latest" helps to keep up with the latest Kotlin support
40+
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
41+
tools: latest
42+
43+
- name: Assemble
44+
# --no-build-cache is required for codeql to analyze all modules
45+
# --no-daemon is required for codeql to observe the compilation
46+
# (see https://docs.github.com/en/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis#specifying-build-commands)
47+
run: ./gradlew assemble --no-build-cache --no-daemon
48+
49+
- name: Perform CodeQL analysis
50+
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8

0 commit comments

Comments
 (0)