Skip to content

Commit 930bc6d

Browse files
authored
Update snyk-security.yml
Signed-off-by: David Osipov <[email protected]>
1 parent b3d0408 commit 930bc6d

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

.github/workflows/snyk-security.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,51 @@ jobs:
4949
python-version: '3.13.2'
5050

5151
- name: Create Sarif file's dir
52-
run: mkdir sarif
52+
run: |
53+
mkdir sarif
54+
mkdir safir/merged
5355
5456
- name: Install dependencies
5557
run: |
5658
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
5759
if [ -f Pipfile ]; then pip install pipenv && pipenv install --dev; fi
5860
if [ -f pyproject.toml ]; then pip install poetry && poetry install; fi
5961
60-
- name: Run Snyk to check for vulnerabilities
62+
- name: Run Snyk to check for vulnerabilities and output Sarif
6163
uses: snyk/actions/python-3.10@cdb760004ba9ea4d525f2e043745dfe85bb9077e
6264
continue-on-error: true # To make sure that SARIF upload gets called
6365
env:
6466
SNYK_TOKEN: ${{ secrets.SNYK_SECRET_TOKEN }}
6567
with:
6668
args: --sarif-file-output=sarif/snyk.sarif
67-
6869

70+
- name: Run Snyk to check for vulnerabilities and monitor
71+
uses: snyk/actions/python-3.10@cdb760004ba9ea4d525f2e043745dfe85bb9077e
72+
continue-on-error: true # To make sure that SARIF upload gets called
73+
env:
74+
SNYK_TOKEN: ${{ secrets.SNYK_SECRET_TOKEN }}
75+
with:
76+
command: monitor
77+
6978
# Runs Snyk Open Source (SCA) analysis and uploads result to Snyk.
70-
- name: Snyk Open Source monitor
79+
- name: Run Snyk Open Source Analysis and output Sarif
7180
continue-on-error: true # To make sure that SARIF upload gets called
7281
env:
7382
SNYK_TOKEN: ${{ secrets.SNYK_SECRET_TOKEN }}
7483
run: snyk test --all-projects --sarif-file-output=sarif/snyk-SCA.sarif
7584

85+
86+
- name: Run Snyk Open Source Analysis and monitor
87+
continue-on-error: true # To make sure that SARIF upload gets called
88+
env:
89+
SNYK_TOKEN: ${{ secrets.SNYK_SECRET_TOKEN }}
90+
run: snyk test monitor --all-projects
91+
92+
# - name: Merge 2 Sarif reports
93+
# uses: github/codeql-action/merge-results@latest
94+
95+
96+
7697
# Push the Snyk Code results into GitHub Code Scanning tab
7798
- name: Upload result to GitHub Code Scanning
7899
uses: github/codeql-action/upload-sarif@6349095d19ec30397ffb02a63b7aa4f867deb563

0 commit comments

Comments
 (0)