-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.14 KB
/
java-codeql-scan.yml
File metadata and controls
50 lines (43 loc) · 1.14 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
name: CodeQL Java Scan
on:
workflow_call:
inputs:
codeql-cfg-path:
description: "Optional path to CodeQL config"
required: false
type: string
build-command:
description: "Manual build command for Java project"
required: true
type: string
jdk-version:
description: "Java version to use"
required: false
type: string
default: '21'
jobs:
analyze:
name: CodeQL Analyze (Java)
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ inputs.jdk-version }}
- name: Init CodeQL
uses: github/codeql-action/init@v3
with:
languages: java
config-file: ${{ inputs.codeql-cfg-path }}
- name: Manual build
run: |
${{ inputs.build-command }}
- name: CodeQL Analyze
uses: github/codeql-action/analyze@v3