-
Notifications
You must be signed in to change notification settings - Fork 106
57 lines (47 loc) · 1.37 KB
/
codeql-analysis.yml
File metadata and controls
57 lines (47 loc) · 1.37 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
name: "CodeQL Analysis"
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 0 * * 0' # Weekly scan
jobs:
analyze:
name: Analyze
runs-on: windows-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [csharp]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: .github/codeql-config.yml
- name: Restore NuGet packages
run: |
nuget restore sqlnexus.sln -PackagesDirectory packages -NonInteractive
- name: Build .NET Framework solution
shell: pwsh
run: |
$msbuild = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
-latest -products * -requires Microsoft.Component.MSBuild `
-find MSBuild\**\Bin\MSBuild.exe
Write-Host "Using MSBuild at $msbuild"
& $msbuild .github\sqlnexus-codeql.slnf `
/t:Rebuild `
/p:Configuration=Release `
/p:Platform="Any CPU" `
/p:UseSharedCompilation=false `
/nodeReuse:false `
/m:1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3