-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (52 loc) · 1.57 KB
/
Copy pathcodeql.yml
File metadata and controls
61 lines (52 loc) · 1.57 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
name: CodeQL
on:
push:
branches:
- main
pull_request:
branches:
- main
- dev
schedule:
# Weekly scan for newly-disclosed vulnerability patterns, not just new code.
- cron: '19 4 * * 1'
jobs:
analyze:
name: Analyze (java-kotlin)
runs-on: ubuntu-latest
permissions:
security-events: write
packages: read
steps:
- name: Checkout with submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Set up Flutter 3.44.0 stable
uses: subosito/flutter-action@v2
with:
flutter-version: '3.44.0'
channel: stable
cache: true
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java-kotlin
build-mode: manual
- name: Install dependencies
run: flutter pub get
# Compile only the JVM unit tests (android/app/src/test) rather than a
# full app assemble — CodeQL only needs to see the Kotlin source being
# built, and this avoids needing the native/CMake toolchain or a
# matching compileSdk platform image in the runner image.
- name: Compile Kotlin sources for analysis
run: cd android && ./gradlew compileDebugKotlin compileDebugUnitTestKotlin
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:java-kotlin"