Skip to content

Commit

Permalink
chore: setup snyk
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed May 18, 2024
1 parent 7cacbfc commit 8eaf0ef
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,29 @@ jobs:
with:
sarif_file: devskim-results.sarif
category: devskim

snyk:
name: snyk
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install -g snyk
- run: snyk auth ${{ secrets.SNYK_TOKEN }}
- run: snyk monitor --all-projects
- run: snyk code test $(realpath src) --sarif > snyk-results.sarif || true
- run: |
jq '(.. | select(type == "object" and .artifactLocation and .artifactLocation.uri) | .artifactLocation.uri) |= "src/" + .' snyk-results.sarif > snyk-results.sarif.tmp
mv snyk-results.sarif.tmp snyk-results.sarif
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk-results.sarif
category: snyk
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules
dist
*.log
*.tgz
.dccache
*.sarif

0 comments on commit 8eaf0ef

Please sign in to comment.