Skip to content

Commit 5a30ddc

Browse files
committed
Code QL PR analysis
* Added new workflow for PR analysis using GitHub Code QL. * Renamed existing PR DevSkim analysis for uniformity. * Added push triggers for analysis workflows to have a baseline for PR analysis.
1 parent cf6588e commit 5a30ddc

File tree

3 files changed

+43
-4
lines changed

3 files changed

+43
-4
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: PR Analysis Code QL
2+
3+
on:
4+
push:
5+
branches: [ dev, main ]
6+
pull_request:
7+
branches: [ dev, main ]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-and-analyze:
14+
runs-on: windows-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
24+
- name: Initialize CodeQL
25+
uses: github/codeql-action/init@v2
26+
with:
27+
languages: 'csharp'
28+
29+
- name: Run build
30+
run: ./Build.ps1 -SkipTests
31+
32+
- name: Perform CodeQL Analysis
33+
uses: github/codeql-action/analyze@v2
34+
with:
35+
category: "/language:csharp"

.github/workflows/pr-codescan.yml renamed to .github/workflows/pr-analysis-devskim.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
name: PR Code Scan
1+
name: PR Analysis DevSkim
22

33
on:
4+
push:
5+
branches: [ dev, main ]
46
pull_request:
57
branches: [ dev, main ]
68

79
# Allows you to run this workflow manually from the Actions tab
810
workflow_dispatch:
911

1012
jobs:
11-
lint:
12-
runs-on: ubuntu-20.04
13+
analyze:
14+
runs-on: ubuntu-latest
1315
permissions:
1416
actions: read
1517
contents: read
1618
security-events: write
19+
1720
steps:
1821
- name: Checkout code
1922
uses: actions/checkout@v3

serilog-sinks-mssqlserver.sln

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2626
CHANGES.md = CHANGES.md
2727
Directory.Packages.props = Directory.Packages.props
2828
.github\ISSUE_TEMPLATE.md = .github\ISSUE_TEMPLATE.md
29-
.github\workflows\pr-codescan.yml = .github\workflows\pr-codescan.yml
3029
.github\workflows\pr-validation.yml = .github\workflows\pr-validation.yml
30+
.github\workflows\pr-analysis-codeql.yml = .github\workflows\pr-analysis-codeql.yml
31+
.github\workflows\pr-analysis-devskim.yml = .github\workflows\pr-analysis-devskim.yml
3132
README.md = README.md
3233
.github\workflows\release.yml = .github\workflows\release.yml
3334
EndProjectSection

0 commit comments

Comments
 (0)