Skip to content

Commit c09ec44

Browse files
authored
Add CodeQL (#31)
1 parent b538ddf commit c09ec44

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
with:
26+
# the nebula plugin used in this repo needs the tags
27+
fetch-depth: 0
28+
29+
- name: Set up Java 17
30+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
31+
with:
32+
distribution: temurin
33+
java-version: 17
34+
35+
- name: Set up gradle
36+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
37+
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
40+
with:
41+
languages: java, actions
42+
# using "latest" helps to keep up with the latest Kotlin support
43+
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
44+
tools: latest
45+
46+
- name: Assemble
47+
# --no-build-cache is required for codeql to analyze all modules
48+
# --no-daemon is required for codeql to observe the compilation
49+
# (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)
50+
run: ./gradlew assemble --no-build-cache --no-daemon
51+
52+
- name: Perform CodeQL analysis
53+
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8

.github/workflows/main-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
with:
18+
# the nebula plugin used in this repo needs the tags
1819
fetch-depth: 0
1920

2021
- id: setup-java-17

.github/workflows/pr-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
with:
18+
# the nebula plugin used in this repo needs the tags
1819
fetch-depth: 0
1920

2021
- id: setup-java-17

.github/workflows/release-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121
with:
22+
# the nebula plugin used in this repo needs the tags
2223
fetch-depth: 0
2324

2425
- id: setup-java-17

0 commit comments

Comments
 (0)