Skip to content

Commit

Permalink
fix(githubActions): add dependency scan static scan
Browse files Browse the repository at this point in the history
  • Loading branch information
HoseaCodes committed Aug 11, 2023
1 parent 80f7f13 commit f832404
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 13 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Snyk Scan
on:
push:
branches:
- main
jobs:
static-scan:
runs-on: ubuntu-latest
env:
JSON_OUTPUT: snyk-static-scan.json
steps:
- uses: actions/checkout@master
- uses: snyk/actions/setup@master
- uses: actions/setup-go@v1
- name: Run Snyk to check for vulnerabilities
continue-on-error: true
run: |
snyk code test
snyk-to-html -i $JSON_OUTPUT -o snyk.html
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Archive snyk results
uses: actions/upload-artifact@v3
with:
name: snyk-report
path: output/scan/snyk.html
retention-days: 5
dependency-scan:
runs-on: ubuntu-latest
env:
JSON_OUTPUT: snyk-dependency-scan.json
steps:
- uses: actions/checkout@master
- uses: snyk/actions/setup@master
- uses: actions/setup-go@v1
- name: Run Snyk to check for vulnerabilities
continue-on-error: true
run: |
snyk test
snyk-to-html -i $JSON_OUTPUT -o snyk.html
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Archive snyk results
uses: actions/upload-artifact@v3
with:
name: snyk-report
path: output/scan/snyk.html
retention-days: 5
19 changes: 6 additions & 13 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
name: Snyk Scan
on: push
on:
push:
branches:
- master
jobs:
security:
runs-on: ubuntu-latest
env:
JSON_OUTPUT: snyk-static-scan.json
steps:
- uses: actions/checkout@master
- uses: snyk/actions/setup@master
- uses: actions/setup-go@v1
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
continue-on-error: true
run: |
snyk code test
snyk-to-html -i $JSON_OUTPUT -o snyk.html
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Archive snyk results
uses: actions/upload-artifact@v3
with:
name: snyk-report
path: output/scan/snyk.html
retention-days: 5
command: monitor

0 comments on commit f832404

Please sign in to comment.