Repository navigation
84 lines (74 loc) · 2.69 KB
/
Copy pathcodeql.yml
File metadata and controls
84 lines (74 loc) · 2.69 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
# SPDX-FileCopyrightText: 2026 ReallyMe Technologies Limited
#
# SPDX-License-Identifier: MIT OR Apache-2.0
name: CodeQL
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
schedule:
- cron: '19 4 * * 1'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
analyze:
name: Analyze ${{ matrix.language }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: actions
os: ubuntu-latest
build-mode: none
- language: javascript-typescript
os: ubuntu-latest
build-mode: none
- language: rust
os: ubuntu-latest
build-mode: none
- language: java-kotlin
os: ubuntu-latest
build-mode: manual
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Validate Gradle wrapper
if: matrix.language == 'java-kotlin'
uses: gradle/actions/wrapper-validation@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
- name: Install Java
if: matrix.language == 'java-kotlin'
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
problem-matcher: true
distribution: temurin
java-version: '21'
- name: Initialize CodeQL
uses: github/codeql-action/init@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-and-quality
- name: Build Java and Kotlin for analysis
if: matrix.language == 'java-kotlin'
# Both Gradle roots live under packages/. The automatic builder does not
# discover them, so compile each source set while CodeQL is tracing.
run: |
packages/kotlin/gradlew -p packages/kotlin --no-daemon --no-build-cache --rerun-tasks compileKotlin compileJava
packages/kotlin/gradlew -p packages/kotlin-android --no-daemon --no-build-cache --rerun-tasks compileReleaseKotlin compileReleaseJavaWithJavac :consumer-r8-runtime:compileReleaseJavaWithJavac
- name: Analyze CodeQL
uses: github/codeql-action/analyze@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4
with:
category: /language:${{ matrix.language }}