Repository navigation
82 lines (70 loc) · 2.24 KB
/
Copy pathcodeql.yml
File metadata and controls
82 lines (70 loc) · 2.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
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
# Static analysis for the C# sources and the GitHub Actions workflows.
# The security-and-quality query suite reports both exploitable vulnerabilities
# and maintainability problems. Results appear under Security -> Code scanning.
name: CodeQL
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
schedule:
# Weekly full scan, even when the branch is quiet.
- cron: "17 3 * * 1"
workflow_dispatch:
permissions:
contents: read
actions: read
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze-csharp:
name: Analyze C#
runs-on: windows-latest
timeout-minutes: 30
permissions:
contents: read
actions: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Set up .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6
with:
dotnet-version: 10.0.x
- name: Initialize CodeQL
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
with:
languages: csharp
build-mode: manual
queries: security-and-quality
config-file: ./.github/codeql/codeql-config.yml
- name: Restore
run: dotnet restore CSharp_CHDStudio.sln
- name: Build
run: dotnet build CSharp_CHDStudio.sln -c Release --no-restore
- name: Analyze
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
with:
category: "/language:csharp"
analyze-actions:
name: Analyze GitHub Actions
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
actions: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Initialize CodeQL
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
with:
languages: actions
queries: security-and-quality
- name: Analyze
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
with:
category: "/language:actions"