-
Notifications
You must be signed in to change notification settings - Fork 167
77 lines (66 loc) · 2.7 KB
/
codeql.yml
File metadata and controls
77 lines (66 loc) · 2.7 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
name: "CodeQL Advanced"
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '47 1 * * 2' # Run at 1:47 on Tuesdays
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Use VS 2026 preview runner (GA May 4, 2026, then switch to windows-2025)
runs-on: windows-2025-vs2026
permissions:
packages: read
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual
steps:
- name: Harden Runner
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: 'recursive'
- name: Install Windows 11 SDK (10.0.22621.0)
shell: pwsh
run: |
& "${{ github.workspace }}\scripts\install-winsdk.ps1"
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Build for CodeQL
shell: pwsh
run: |
$path = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
# Build Release_Unicode|x64 for CodeQL analysis
& $path\MSBuild\Current\Bin\amd64\msbuild.exe /m /p:Configuration=Release_Unicode /p:Platform=x64 mfcmapi.sln
- name: Perform CodeQL Analysis
id: analyze
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
with:
category: "/language:${{matrix.language}}"
- name: Upload CodeQL Analysis Results
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
path: ${{ steps.analyze.outputs.sarif-output }}