Skip to content

Commit 4ae01ee

Browse files
committed
💚 Adds CodeQL
1 parent 8ac520f commit 4ae01ee

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "CodeQL - C#"
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
branches: [master, main]
8+
schedule:
9+
- cron: '0 4 * * 0' # Runs every Sunday at 4AM
10+
11+
jobs:
12+
analyze:
13+
name: CodeQL Security Scan
14+
runs-on: windows-latest
15+
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Setup .NET
26+
uses: actions/setup-dotnet@v4
27+
with:
28+
dotnet-version: '9.x'
29+
30+
- name: Restore dependencies
31+
run: dotnet restore RestSharp.Authenticators.Digest.sln
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v3
35+
with:
36+
languages: csharp
37+
38+
- name: Build project
39+
run: dotnet build RestSharp.Authenticators.Digest.sln --no-restore --configuration Release
40+
41+
- name: Run CodeQL analysis
42+
uses: github/codeql-action/analyze@v3

RestSharp.Authenticators.Digest.sln

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{AB3531
2525
images\icon.png = images\icon.png
2626
EndProjectSection
2727
EndProject
28+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{E1BF084D-B1BB-4A98-9B19-55A78DD0CBB9}"
29+
EndProject
30+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{46506451-F83B-4074-9BF7-D05E3CBB7D05}"
31+
ProjectSection(SolutionItems) = preProject
32+
.github\workflows\codeql.yml = .github\workflows\codeql.yml
33+
EndProjectSection
34+
EndProject
2835
Global
2936
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3037
Debug|Any CPU = Debug|Any CPU
@@ -66,6 +73,7 @@ Global
6673
GlobalSection(NestedProjects) = preSolution
6774
{CBC300D5-B57C-4588-BE2D-26AFF9D102F9} = {1D1F223D-4333-4699-BB10-8E1111DD0D75}
6875
{607B2AF3-A2CB-47D3-AA26-B8E79E93A4EE} = {EB4DC82C-C9F5-4745-82A9-D1287A1BBC3F}
76+
{46506451-F83B-4074-9BF7-D05E3CBB7D05} = {E1BF084D-B1BB-4A98-9B19-55A78DD0CBB9}
6977
EndGlobalSection
7078
GlobalSection(ExtensibilityGlobals) = postSolution
7179
SolutionGuid = {CFB144EC-8162-4D4F-A173-0E97D11BD3D8}

0 commit comments

Comments
 (0)