Repository navigation
88 lines (77 loc) · 2.06 KB
/
Copy pathcodeql.yml
File metadata and controls
88 lines (77 loc) · 2.06 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: CodeQL
on:
push:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '*.md'
- 'LICENSE'
- '.github/**'
- '**/*.txt'
- '**/*.json'
- '**/*.yml'
- '**/*.yaml'
- '!.github/workflows/**'
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '*.md'
- 'LICENSE'
- '.github/**'
- '**/*.txt'
- '**/*.json'
- '**/*.yml'
- '**/*.yaml'
- '!.github/workflows/**'
schedule:
- cron: '30 3 * * 1' # Weekly Monday 3:30 AM UTC
# Cancel in-progress runs for the same branch/PR
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
env:
MAVEN_USERNAME: ${{ github.actor }}
MAVEN_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
analyze:
runs-on: ubuntu-latest
name: CodeQL Analysis
timeout-minutes: 30
permissions:
security-events: write
contents: read
actions: read
strategy:
fail-fast: false
matrix:
language: [ 'java-kotlin', 'javascript-typescript', 'python', 'ruby' ]
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up JDK
if: matrix.language == 'java-kotlin'
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
cache: 'maven'
server-id: spectrayan-github-server-sent-events
server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
queries: security-extended
config-file: .github/codeql/codeql-config.yml
- name: Build for CodeQL
if: matrix.language == 'java-kotlin'
run: |
mvn -B clean package -DskipTests \
--no-transfer-progress \
-Dorg.slf4j.simpleLogger.defaultLogLevel=WARN
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: '/language:${{ matrix.language }}'