Skip to content

Commit a121d7d

Browse files
Adding code changes to integrate codeQL tool into pipeline (#769)
* code changes to add codeQL tool into pipeline * additional change to make warnings as errors to false * removed cron code as it's not needed * removed redundant package restore
1 parent 068dc51 commit a121d7d

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "CodeQL Analysis"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ "main", "release/*" ]
7+
pull_request:
8+
branches: [ "main", "release/*" ]
9+
10+
jobs:
11+
analyze:
12+
name: Analyze (C#)
13+
runs-on: windows-latest
14+
timeout-minutes: 120
15+
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Setup .NET SDK
29+
uses: actions/setup-dotnet@v4
30+
with:
31+
global-json-file: global.json
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v4
35+
with:
36+
languages: csharp
37+
queries: security-extended
38+
39+
- name: Restore NuGet packages
40+
run: |
41+
dotnet restore WPFSamples.sln
42+
43+
- name: Build solution
44+
run: dotnet build WPFSamples.sln --configuration Release --no-restore /p:Platform="Any CPU" /p:LangVersion=latest /p:TreatWarningsAsErrors=false
45+
continue-on-error: true
46+
- name: Perform CodeQL Analysis
47+
uses: github/codeql-action/analyze@v4
48+
with:
49+
category: "/language:csharp"

0 commit comments

Comments
 (0)