Skip to content

Commit c98103e

Browse files
committed
Added example step for filtering false-positive detection and fix comments
1 parent c02e068 commit c98103e

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/check_sast.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
permissions:
5555
actions: read # for github/codeql-action/init to get workflow details
5656
contents: read # for actions/checkout to fetch code
57-
security-events: write # for github/codeql-action/autobuild to send a status report
57+
security-events: write # for github/codeql-action/upload-sarif to send a status report
5858
# CodeQL fails to run pull requests from dependabot due to missing write access to upload results.
5959
if: >-
6060
${{!(false
@@ -113,6 +113,17 @@ jobs:
113113
if: ${{ matrix.language == 'ruby' }}
114114
continue-on-error: true
115115

116+
- name: filter-sarif
117+
uses: advanced-security/filter-sarif@2da736ff05ef065cb2894ac6892e47b5eac2c3c0 # v1.1.0.1.1
118+
with:
119+
patterns: |
120+
+**/*.c
121+
+**/*.h
122+
input: sarif-results/${{ matrix.language }}.sarif
123+
output: sarif-results/${{ matrix.language }}.sarif
124+
if: ${{ matrix.language == 'cpp' }}
125+
continue-on-error: true
126+
116127
- name: Upload SARIF
117128
uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
118129
with:

0 commit comments

Comments
 (0)