Create codeTest.yaml #1
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
name: Workflow for SAST & SCA | |
on: push | |
jobs: | |
security: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Run Snyk to check for vulnerabilities in dependencies | |
uses: snyk/actions/python@master # See https://github.com/snyk/actions for other supported build tools/languages | |
continue-on-error: true | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
command: test --all-projects --json-file-output=snyk_dependencies.json | |
- name: Run Snyk to check for vulnerabilities in code | |
uses: snyk/actions/python@master # See https://github.com/snyk/actions for other supported build tools/languages | |
continue-on-error: true | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
command: code test --all-projects --json-file-output=snyk_code.json | |
- name: Add Job Summary from Snyk reports | |
uses: medly/snyk-job-summary-action@v1.0.0 | |
with: | |
dependencies-report-path: snyk_dependencies.json # The file name of json file which is generated on snyk test | |
code-report-path: snyk_code.json # The file name of json file which is generated on snyk code test |