Skip to content

Commit

Permalink
CI CodeQL: Code Filter
Browse files Browse the repository at this point in the history
C++ analysis does not yet support
  • Loading branch information
ax3l committed Dec 12, 2022
1 parent 3cc287d commit e8378ee
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/codeql/impactx-codeql.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: "ImpactX CodeQL config"

# ignore ABLASTR, AMReX, pyAMReX, openPMD et al.
# note: not yet suppored, thus doing post-analysis SARIF filtering
paths-ignore:
- build/_deps
20 changes: 20 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,23 @@ jobs:
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
upload: False
output: sarif-results

- name: filter-sarif
uses: advanced-security/filter-sarif@v1
with:
patterns: |
-build/_deps/*/*
-build/_deps/*/*/*
-build/_deps/*/*/*/*
-build/_deps/*/*/*/*/*
-build/_deps/*/*/*/*/*/*
-build/_deps/*/*/*/*/*/*/*
input: sarif-results/${{ matrix.language }}.sarif
output: sarif-results/${{ matrix.language }}.sarif

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

0 comments on commit e8378ee

Please sign in to comment.