-
Notifications
You must be signed in to change notification settings - Fork 29
40 lines (32 loc) · 1.02 KB
/
codeql-analysis.yml
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
# https://github.com/github/codeql
# https://github.com/github/codeql-action
name: CodeQL analysis
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
queries: security-and-quality
languages: csharp
- name: Install dependencies
working-directory: src
run: dotnet restore
- name: Build CodeQL solution
# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow#reduce-the-amount-of-code-being-analyzed-in-a-single-workflow
working-directory: src
run: dotnet build --no-restore
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3