-
Notifications
You must be signed in to change notification settings - Fork 830
60 lines (53 loc) · 1.87 KB
/
codeql.yml
File metadata and controls
60 lines (53 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
name: CodeQL Security Analysis
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "29 13 * * 2" # Weekly Tuesday 13:29 UTC
permissions: {}
jobs:
analyze:
name: Analyze Java
runs-on: ubuntu-24.04
permissions:
actions: read # required for github/codeql-action/init to get workflow details
contents: read
security-events: write # required for github/codeql-action/analyze to upload SARIF
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Set up Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
distribution: temurin
java-version: "25"
- name: Cache Maven repository
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-codeql-${{ hashFiles('**/pom.xml') }}
- name: Initialize CodeQL
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
languages: java
tools: linked
queries: security-extended
# Do not use autobuild — the multi-module Maven structure requires explicit
# build invocation so that CodeQL can trace the compilation correctly.
# Do not use mise-action here — CodeQL needs to trace the raw Maven build.
- name: Build (CodeQL traces the build)
run: >
./mvnw clean compile
-DskipTests
-Dcoverage.skip=true
-Dcheckstyle.skip=true
-Djavadoc.skip=true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
category: /language:java