Repository navigation
87 lines (73 loc) · 2.08 KB
/
Copy pathsecurity-codeql.yml
File metadata and controls
87 lines (73 loc) · 2.08 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
name: CodeQL
on:
push:
branches: [main]
paths:
- "apps/**"
- "libs/**"
- "cmake/**"
- "CMakeLists.txt"
- ".github/workflows/security-codeql.yml"
pull_request:
branches: [main]
paths:
- "apps/**"
- "libs/**"
- "cmake/**"
- "CMakeLists.txt"
- ".github/workflows/security-codeql.yml"
# Monthly, so new CodeQL queries also run on code that has not changed.
schedule:
- cron: "0 4 1 * *"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: codeql-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: CodeQL Analysis
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
ninja-build \
libx11-dev \
libxrandr-dev \
libxinerama-dev \
libxcursor-dev \
libxi-dev \
libgl1-mesa-dev \
libwayland-dev \
libxkbcommon-dev
- uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
languages: cpp
# Manual build mode: we control exactly what gets compiled and analyzed.
build-mode: manual
queries: security-extended
# Report only Sortly's own sources (third_party is still compiled, never reported).
config: |
paths:
- apps
- libs
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DSORTLY_ENABLE_UNIT_TESTS=OFF
- name: Build
run: cmake --build build --parallel
- uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
category: "/language:cpp"