-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dan Cox
authored and
Dan Cox
committed
Jan 24, 2024
1 parent
b95a0b8
commit 622b88a
Showing
1 changed file
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,51 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [develop] | ||
branches: [ develop ] | ||
paths-ignore: | ||
- 'test/**' | ||
paths: | ||
- src | ||
pull_request: | ||
branches: [develop] | ||
branches: [ develop ] | ||
paths-ignore: | ||
- 'test/**' | ||
paths: | ||
- src | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
upload: false # disable the upload here - we will upload in a different action | ||
output: sarif-results | ||
|
||
- name: filter-sarif | ||
uses: advanced-security/filter-sarif@v1 | ||
with: | ||
# filter out all test files unless they contain a sql-injection vulnerability | ||
patterns: | ||
-test/**/* | ||
+test/**/*:js/sql-injection | ||
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 |