File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -141,5 +141,29 @@ jobs:
141141 if : ${{ matrix.build-mode == 'manual' }}
142142 run : python scripts/build_codeql_language.py ${{ matrix.language }} ${{ matrix.paths }}
143143
144- - name : Perform CodeQL Analysis
144+ - name : Perform CodeQL Analysis With Upload
145+ if : ${{ matrix.language != 'cpp' || github.event_name == 'pull_request' }}
145146 uses : github/codeql-action/analyze@v3
147+
148+ - name : Perform CodeQL Analysis Without Upload
149+ if : ${{ matrix.language == 'cpp' && github.event_name != 'pull_request' }}
150+ uses : github/codeql-action/analyze@v3
151+ with :
152+ upload : false
153+ output : sarif-results
154+
155+ - name : Filter Sarif
156+ if : ${{ matrix.language == 'cpp' && github.event_name != 'pull_request' }}
157+ uses : advanced-security/filter-sarif@v1
158+ with :
159+ patterns : |
160+ +archive/c/c-plus-plus/*.cpp
161+ -archive/h/hack/*.hh
162+ input : sarif-results/${{ matrix.language }}.sarif
163+ output : sarif-results/${{ matrix.language }}.sarif
164+
165+ - name : Upload SARIF
166+ if : ${{ matrix.language == 'cpp' && github.event_name != 'pull_request' }}
167+ uses : github/codeql-action/upload-sarif@v2
168+ with :
169+ sarif_file : sarif-results/${{ matrix.language }}.sarif
You can’t perform that action at this time.
0 commit comments