Repository navigation
72 lines (60 loc) · 2.08 KB
/
Copy pathcodeql.yml
File metadata and controls
72 lines (60 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
name: CodeQL
# CodeQL does interprocedural taint analysis - it follows a value from where it
# enters the program to where it is used. That is complementary to
# TreatWarningsAsErrors and the analyzers ci.yml already gates on, which match
# known-dangerous shapes at a single call site rather than tracing a value
# across calls.
#
# windows-latest, not ubuntu-latest like TcgDex.CSharpSdk's version of this
# workflow: this repository's automation layer is raw IUIAutomation COM and
# every project targets net10.0-windows, so it can only build where ci.yml
# already builds it.
#
# Free for public repositories.
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Weekly, Tuesday 04:23 UTC - a different day and an off-hour minute from
# ci.yml and mutation.yml, so a scheduled security scan never queues
# behind either of them.
- cron: "23 4 * * 2"
workflow_dispatch:
permissions:
contents: read
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
jobs:
analyze:
name: Analyze C#
runs-on: windows-latest
permissions:
# Required to upload results to the Security tab.
security-events: write
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v6
with:
dotnet-version: "10.0.x"
- name: Initialise CodeQL
uses: github/codeql-action/init@v4
with:
languages: csharp
queries: security-and-quality
# The whole solution, matching ci.yml's own build step: unlike
# TcgDex.CSharpSdk, WindowsDriverCore's projects are genuinely different
# code rather than one library multi-targeted three times, so there is
# no single project that stands in for the rest.
- name: Restore
run: dotnet restore WindowsDriverCore.slnx
- name: Build
run: dotnet build WindowsDriverCore.slnx --no-restore --configuration Release
- name: Analyse
uses: github/codeql-action/analyze@v4
with:
category: "/language:csharp"