Skip to content

Commit

Permalink
Update codeql.yml
Browse files Browse the repository at this point in the history
Update CodeQL to exclude .g.cs files
  • Loading branch information
jas88 authored Oct 25, 2024
1 parent 8e7ae98 commit ba52d10
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:

strategy:
fail-fast: false
matrix:
language: [ csharp ]

steps:
- name: Checkout
Expand All @@ -29,13 +27,29 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
languages: csharp
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Build
run: dotnet build -c Debug

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
category: "/language:csharp"
upload: False
output: sarif-results

- name: filter-sarif
uses: advanced-security/filter-sarif@v1
with:
patterns: |
+**/*
-**/*.g.cs
input: sarif-results/csharp.sarif
output: sarif-results/csharp.sarif

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif-results/csharp.sarif

0 comments on commit ba52d10

Please sign in to comment.