Skip to content

Commit

Permalink
Filter github codeQL scan results to exclude external dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Niethammer <[email protected]>
  • Loading branch information
cniethammer committed Dec 13, 2024
1 parent cbe6a66 commit d92738f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,25 @@ jobs:
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
output: sarif-results
upload: failure-only

- name: Filter CodeQL results
uses: advanced-security/filter-sarif@v1
with:
patterns: |
-external/
input: sarif-results/${{matrix.language}}.sarif
output: sarif-results/${{matrix.language}}.sarif

- name: Upload CodeQL results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif-results/${{matrix.language}}.sarif

- name: Upload loc as a Build Artifact
uses: actions/upload-artifact@v4
with:
name: sarif-results
path: sarif-results
retention-days: 1

0 comments on commit d92738f

Please sign in to comment.