Skip to content

Commit

Permalink
Update snyk job to handle npm deps (weaveworks#210)
Browse files Browse the repository at this point in the history
* Update snyk job to handle npm deps

* Add NPM audit step to test
  • Loading branch information
jpellizzari authored May 26, 2021
1 parent 049004a commit ed6cf92
Show file tree
Hide file tree
Showing 3 changed files with 321 additions and 398 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/docker_scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
uses: actions/checkout@v2
- name: Fake Install flux
run: mkdir -p pkg/flux/bin && touch pkg/flux/bin/flux
- name: Remove UI deps from Scan
run: rm package-lock.json && rm package.json && make cmd/ui/dist/index.html
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/golang@master
env:
Expand Down Expand Up @@ -96,13 +98,13 @@ jobs:
uses: aquasecurity/trivy-action@master
with:
image-ref: weaveworks/wego-controller:${{ github.sha }}
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: 'trivy-results.sarif'
sarif_file: "trivy-results.sarif"

codeql:
name: CodeQL
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
uses: actions/checkout@v2
- name: Install UI Deps
run: npm ci
- name: NPM Audit
run: npm audit
- name: Build UI Assets
run: make cmd/ui/dist/main.js
- name: Fake Install flux
Expand Down
Loading

0 comments on commit ed6cf92

Please sign in to comment.