Repository navigation
67 lines (56 loc) · 2.29 KB
/
Copy pathcodeql.yml
File metadata and controls
67 lines (56 loc) · 2.29 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
# Static security analysis, modelled on Agenda Tech's.
#
# Notes Tech 3.0 is Kotlin end to end, so CodeQL now sees the whole app, crypto included. In the
# Flutter versions it only saw the android/ shell and the Dart code stayed out of its reach.
#
# It does not replace detekt: detekt judges style and patterns, CodeQL follows data FLOWS (untrusted
# input reaching a sensitive operation). Neither finds what the other finds, and neither finds what a
# review finds.
name: CodeQL
on:
push:
branches: [main, 'fix/**', 'feat/**']
pull_request:
schedule:
# Monday morning: a flaw published in a dependency does not wait for the next commit.
- cron: '0 6 * * 1'
workflow_dispatch:
permissions:
contents: read
security-events: write
env:
# Same pins as android.yml: the debug build compiles whisper.cpp.
NDK_VERSION: "27.0.12077973"
CMAKE_VERSION: "3.22.1"
jobs:
analyze:
name: Analyse (java-kotlin)
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: '17'
- uses: gradle/actions/setup-gradle@v6
- name: Install the pinned NDK and CMake
run: yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;$NDK_VERSION" "cmake;$CMAKE_VERSION" > /dev/null
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: java-kotlin
queries: security-and-quality
# An explicit build rather than `autobuild`: the project has a KSP chain (Room, Hilt) and reads
# version.properties at build time. What `autobuild` guesses wrong it analyses less, and a partial
# analysis that presents itself as complete is worse than none.
#
# `--no-build-cache --rerun-tasks`: CodeQL only extracts what it SEES compiled. On Agenda Tech the
# cache restored by setup-gradle made compileDebugKotlin FROM-CACHE, and the analysis failed with
# "could not process any of it" while the build was green (2026-09-14).
- name: Build
run: ./gradlew --no-daemon --no-build-cache --rerun-tasks :app:assembleDebug
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:java-kotlin"