Repository navigation
51 lines (43 loc) · 1.63 KB
/
Copy pathcodeql.yml
File metadata and controls
51 lines (43 loc) · 1.63 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
name: CodeQL
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
schedule:
# Weekly, because most findings arrive as new queries against unchanged code
# rather than as new code.
- cron: '41 5 * * 1'
workflow_dispatch:
permissions:
contents: read
actions: read
security-events: write
jobs:
analyse:
# WinForms and GDI+ mean the project only builds on Windows, and CodeQL for C#
# analyses what the compiler actually produced.
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v6
with:
dotnet-version: '9.0.x'
- uses: github/codeql-action/init@v4
with:
languages: csharp
build-mode: manual
# security-extended, not security-and-quality. The quality queries produced sixty
# standing findings and not one of them carried a security severity: P/Invoke notes
# in a P/Invoke file, Path.Combine notes, missing xmldoc, and casts the language
# actually requires. A tab that always shows sixty items is a tab you stop opening,
# which is how the one real finding gets missed. Compiler warnings cover style.
queries: security-extended
# Explicit rather than autobuild: the solution has three projects and one of them
# only exists to drive the built executable, so leaving the choice to a heuristic
# invites analysing the wrong thing.
- name: Build
run: dotnet build RateTray.sln --configuration Release
- uses: github/codeql-action/analyze@v4
with:
category: /language:csharp