Skip to content

Commit b473d4c

Browse files
committed
ci: fix SARIF generation in Snyk and update Codacy to v4 to fix CLI crash
1 parent 12003cd commit b473d4c

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

.github/workflows/codacy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
4242
- name: Run Codacy Analysis CLI
43-
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
43+
uses: codacy/codacy-analysis-cli-action@v4
4444
with:
4545
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
4646
# You can also omit the token and run the tools that support default configurations

.github/workflows/snyk-security.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ jobs:
4040
steps:
4141
- uses: actions/checkout@v4
4242
- name: Set up Snyk CLI to check for security issues
43-
# Snyk can be used to break the build when it detects security issues.
44-
# In this case we want to upload the SAST issues to GitHub Code Scanning
45-
uses: snyk/actions/setup@806182742461562b67788a64410098c9d9b96adb
43+
uses: snyk/actions/setup@master
4644

47-
# Runs Snyk Code (SAST) analysis and uploads result into GitHub.
48-
# Use || true to not fail the pipeline
4945
- name: Snyk Code test
50-
run: snyk code test --sarif > snyk-code.sarif || true
46+
run: snyk code test --sarif-file-output=snyk-code.sarif
47+
continue-on-error: true
48+
env:
49+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
5150

5251
# Runs Snyk Open Source (SCA) analysis and uploads result to Snyk.
5352
- name: Snyk Open Source monitor

0 commit comments

Comments
 (0)