-
-
Notifications
You must be signed in to change notification settings - Fork 202
67 lines (59 loc) · 1.38 KB
/
codeql-analysis.yml
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
61
62
63
64
65
66
67
name: "CodeQL Analysis"
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- '**/*.java'
schedule:
- cron: '15 0 15 * *'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
# SETUP BUILD ENVIRONMENT
- id: prepare-maven-build
name: Prepare Maven build
uses: sualeh/[email protected]
with:
java-version: 8
- id: install-graphviz
name: Install Graphviz
uses: sualeh/[email protected]
# INIT CODEQL
- id: init-codeql
name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java
# BUILD AND TEST
- id: build-test
name: Build all modules and run tests
shell: bash
run: |
# Build
mvn \
--no-transfer-progress \
--batch-mode \
-DskipTests \
clean package
# ANALYZE
- id: perform-codeql-analysis
name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:java"
- id: upload-codeql-results
name: Upload CodeQL results
uses: actions/upload-artifact@v4
with:
name: java_sarif
path: ./results/java.sarif
retention-days: 5