-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce01ce3
commit 5ac453d
Showing
1 changed file
with
16 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,26 @@ | ||
name: Snyk Security | ||
name: Snyk Scan | ||
|
||
on: | ||
push: | ||
branches: ["main" ] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
permissions: | ||
contents: read | ||
branches: | ||
- main | ||
|
||
jobs: | ||
snyk: | ||
permissions: | ||
contents: read | ||
security-events: write | ||
actions: read | ||
snyk_scan: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Snyk CLI to check for security issues | ||
uses: snyk/actions/setup@806182742461562b67788a64410098c9d9b96adb | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Authenticate Snyk CLI | ||
run: snyk auth ${{ secrets.SNYK_TOKEN }} | ||
|
||
- name: Snyk Code test | ||
run: snyk code test --unmanaged --sarif-file-output=${{ github.workspace }}/snyk-code.sarif | ||
- name: Setup C++ | ||
uses: actions/setup-cxx@v1 | ||
|
||
- name: List files | ||
run: ls ${{ github.workspace }} | ||
- name: Install dependencies | ||
run: | | ||
# Install your C++ dependencies here | ||
- name: Upload result to GitHub Code Scanning | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: ${{ github.workspace }}/snyk-code.sarif | ||
- name: Snyk Scan | ||
run: npx snyk test --all-projects | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |