Skip to content

Commit b3ddff5

Browse files
authored
Merge pull request #13 from ArturSnyk/sarif/testing-diff-flows
sarif: testing of workflows
2 parents 64fa1b0 + 015a7e9 commit b3ddff5

File tree

6 files changed

+4814
-1008
lines changed

6 files changed

+4814
-1008
lines changed

.github/snyk-test-sarif.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/.workflows/scan.yml renamed to .github/workflows/snyk-code-manual.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: Testing security scan - using sarif
2-
on: [push]
1+
name: "snyk code manual test"
2+
on: [push, pull_request]
33

44
jobs:
55
build:
@@ -13,3 +13,4 @@ jobs:
1313
uses: github/codeql-action/upload-sarif@v1
1414
with:
1515
sarif_file: sarif.json
16+
# sarif_file: example111.json

.github/workflows/snyk-code.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "snyk code test"
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: snyk/actions/setup@master
9+
- name: Snyk Test
10+
run: snyk code test --org=${{ secrets.SNYK_ORG }} --sarif > snyk-sarif2.json
11+
continue-on-error: true
12+
env:
13+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
14+
- name: Upload SARIF file
15+
uses: github/codeql-action/upload-sarif@v1
16+
with:
17+
sarif_file: snyk-sarif2.json

.github/workflows/snyk-test-sarif.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
name: "Upload package.json SARIF"
2-
# Run workflow each time code is pushed to your repository.
3-
on: push
1+
name: "snyk test"
2+
on: [push, pull_request]
43
jobs:
54
build:
65
runs-on: ubuntu-latest
76
steps:
87
- uses: actions/checkout@v2
98
- uses: snyk/actions/setup@master
10-
- name: Snyk Test
9+
- name: Snyk Test
1110
run: snyk test --sarif-file-output=snyk-sarif1.json
12-
continue-on-error: true
11+
continue-on-error: true
1312
env:
14-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
13+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
1514
- name: Upload SARIF file
1615
uses: github/codeql-action/upload-sarif@v1
1716
with:

example111.json

Lines changed: 3021 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)