-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.24 KB
/
codeql.yml
File metadata and controls
49 lines (41 loc) · 1.24 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
name: CodeQL
on:
push:
branches: [master]
schedule:
- cron: '0 6 * * 1' # every Monday at 06:00 UTC
permissions:
contents: read
security-events: write
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: windows-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
language: [c-cpp, python]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-extended
# C/C++ requires a traced build. We use build_test.bat (MSVC only, no
# CUDA) which compiles the core C sources and is available on any runner
# that has Visual Studio — no CUDA Toolkit installation needed.
# Python is interpreted; CodeQL scans it without a build step.
- name: Build C sources for analysis
if: matrix.language == 'c-cpp'
shell: cmd
run: |
if not exist bin mkdir bin
call build_test.bat
if errorlevel 1 exit /b 1
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
with:
category: ${{ matrix.language }}