Skip to content

Commit 890e03c

Browse files
Update SCA workflow to use Snyk CLI
1 parent b3c24d6 commit 890e03c

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/sca-scan.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,33 @@ name: Source Composition Analysis Scan
22
on:
33
pull_request:
44
types: [opened, synchronize, reopened]
5+
56
jobs:
67
security-sca:
78
runs-on: ubuntu-latest
89
steps:
910
- name: Checkout repository
1011
uses: actions/checkout@master
12+
1113
- name: Setup .NET Core @ Latest
1214
uses: actions/setup-dotnet@v1
1315
with:
1416
dotnet-version: "7.0.x"
17+
1518
- name: Run Dotnet Restore
16-
run: |
17-
dotnet restore
19+
run: dotnet restore
20+
21+
- name: Setup Snyk
22+
uses: snyk/actions/setup@master # just installs Snyk CLI, no deprecated dotnet action
23+
1824
- name: Run Snyk to check for vulnerabilities
19-
uses: snyk/actions/dotnet@master
25+
run: |
26+
snyk test \
27+
--file=Contentstack.Core/obj/project.assets.json \
28+
--fail-on=all \
29+
--json-file-output=snyk.json # ← writes snyk.json to disk
2030
env:
2131
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
22-
with:
23-
args: --file=Contentstack.Core/obj/project.assets.json --fail-on=all
24-
json: true
25-
continue-on-error: true
32+
continue-on-error: true # ← let pipeline continue even if vulns found
33+
2634
- uses: contentstack/sca-policy@main

0 commit comments

Comments
 (0)