Skip to content

Commit

Permalink
Update snyk-security.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherrytree56567 authored Sep 19, 2023
1 parent ce01ce3 commit 5ac453d
Showing 1 changed file with 16 additions and 28 deletions.
44 changes: 16 additions & 28 deletions .github/workflows/snyk-security.yml
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 }}

0 comments on commit 5ac453d

Please sign in to comment.