Skip to content

Commit 5e04c11

Browse files
security(codeql): CodeQL-Advanced-Setup fuer C# (manual build)
1 parent 6fcfa09 commit 5e04c11

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: codeql
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
schedule:
9+
# Weekly scan to catch new CodeQL queries or dependency drift.
10+
- cron: "23 3 * * 0"
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
concurrency:
17+
group: codeql-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
defaults:
21+
run:
22+
shell: bash
23+
24+
jobs:
25+
analyze:
26+
name: Analyze (csharp)
27+
runs-on: ubuntu-latest
28+
permissions:
29+
contents: read
30+
security-events: write
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
language: ["csharp"]
35+
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
39+
with:
40+
fetch-depth: 0
41+
fetch-tags: true
42+
43+
- name: Setup .NET
44+
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
45+
with:
46+
dotnet-version: "10.0.102"
47+
48+
- name: Initialize CodeQL
49+
uses: github/codeql-action/init@f5c2471be782132e47a6e6f9c725e56730d6e9a3 # v3
50+
with:
51+
languages: ${{ matrix.language }}
52+
build-mode: manual
53+
queries: security-and-quality
54+
55+
- name: Build (CodeQL traced)
56+
run: |
57+
dotnet restore FileClassifier.sln
58+
dotnet build -c Release --no-restore FileClassifier.sln
59+
60+
- name: Perform CodeQL Analysis
61+
uses: github/codeql-action/analyze@f5c2471be782132e47a6e6f9c725e56730d6e9a3 # v3
62+
with:
63+
category: "/language:${{ matrix.language }}"
64+

0 commit comments

Comments
 (0)