Skip to content

Commit 49fd32d

Browse files
authored
Update snyk-security.yml
1 parent c100304 commit 49fd32d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/snyk-security.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Build code, run unit test, run SAST, SCA, DAST security scans for NodeJs App
2-
on: push
2+
on:
3+
push:
4+
branches:
5+
- main # This triggers the workflow on pushes to the main branch
6+
pull_request:
7+
branches:
8+
- main # This triggers the workflow on pull requests targeting the main branch
39

410
jobs:
511
build:
@@ -13,7 +19,7 @@ jobs:
1319
cache: npm
1420
- run: npm install
1521
- name: SonarCloud Scan
16-
uses: sonarsource/sonarcloud-github-action@main
22+
uses: sonarsource/sonarcloud-github-action@master
1723
env:
1824
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1925
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -26,9 +32,9 @@ jobs:
2632
needs: build
2733
name: Run the SCA scan on the source code
2834
steps:
29-
- uses: actions/checkout@main
35+
- uses: actions/checkout@master
3036
- name: RunSnyk to check for vulnerabilities
31-
uses: snyk/actions/node@main
37+
uses: snyk/actions/node@master
3238
continue-on-error: true
3339
env:
3440
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

0 commit comments

Comments
 (0)