Skip to content

Commit

Permalink
Filter CodeQL Sarif File to Exclude MsQuic (#290)
Browse files Browse the repository at this point in the history
* Filter CodeQL Sarif File to Exclude MsQuic

* Update .github/workflows/build.yml

Co-authored-by: Copilot <[email protected]>

* Add conditional checks for SARIF upload steps

* Update SARIF filter and name formatting

* Update actions to specific commit SHAs

* Update SARIF filter patterns in build.yml

---------

Co-authored-by: Copilot <[email protected]>
  • Loading branch information
nibanks and Copilot authored Dec 27, 2024
1 parent 979c8df commit 7b7b0e9
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ jobs:
with:
languages: c-cpp
build-mode: manual
config: |
paths-ignore:
- msquic
- name: Build
shell: pwsh
run: ./build.ps1 -Arch ${{ matrix.arch }} -Tls ${{ matrix.tls }} -Link ${{ matrix.link }} -Install -BuildInstaller -Debug
Expand All @@ -79,6 +76,26 @@ jobs:
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
with:
category: "/language:c-cpp"
output: sarif-results
upload: failure-only
- name: Filter SARIF
if: ${{ (matrix.os == 'ubuntu') && (matrix.arch == 'x64') && (matrix.link == 'shared') }}
uses: advanced-security/filter-sarif@f3b8118a9349d88f7b1c0c488476411145b6270d
with:
patterns: -msquic/**/*
input: sarif-results/cpp.sarif
output: sarif-results/cpp.sarif
- name: Upload SARIF
if: ${{ (matrix.os == 'ubuntu') && (matrix.arch == 'x64') && (matrix.link == 'shared') }}
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
with:
sarif_file: sarif-results/cpp.sarif
- name: Upload SARIF to Artifacts
if: ${{ (matrix.os == 'ubuntu') && (matrix.arch == 'x64') && (matrix.link == 'shared') }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: sarif-results
path: sarif-results
- name: Upload
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
Expand Down

0 comments on commit 7b7b0e9

Please sign in to comment.