From 429a5170a1bd6f0336680ca5f9693e19282b15bc Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Fri, 31 Oct 2025 17:54:26 +0100 Subject: [PATCH] Refactor SARIF upload steps in workflow Signed-off-by: Niels Lohmann --- .github/workflows/msvc.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml index f38ff6ae0..714bc1697 100644 --- a/.github/workflows/msvc.yml +++ b/.github/workflows/msvc.yml @@ -52,15 +52,15 @@ jobs: # Ruleset file that will determine what checks will be run ruleset: NativeRecommendedRules.ruleset - - name: Patch SARIF for GitHub upload - shell: pwsh - run: | - $sarif = Get-Content "${{ steps.run-analysis.outputs.sarif }}" -Raw | ConvertFrom-Json - $i = 0 - foreach ($run in $sarif.runs) { $run.properties.category = "run-$i"; $i++ } - $sarif | ConvertTo-Json -Depth 100 | Out-File -Encoding utf8 "${{ env.build }}/results_fixed.sarif" + # Upload SARIF file to GitHub Code Scanning Alerts + #- name: Upload SARIF to GitHub + # uses: github/codeql-action/upload-sarif@v3 + # with: + # sarif_file: ${{ steps.run-analysis.outputs.sarif }} - - name: Upload SARIF to GitHub - uses: github/codeql-action/upload-sarif@v3 + # Upload SARIF file as an Artifact to download and view + - name: Upload SARIF as an Artifact + uses: actions/upload-artifact@v4 with: - sarif_file: ${{ env.build }}/results_fixed.sarif + name: sarif-file + path: ${{ steps.run-analysis.outputs.sarif }}