Skip to content

Exercise4: Testing pipeline #1

Exercise4: Testing pipeline

Exercise4: Testing pipeline #1

name: Check with a snyk-analysis for vulnerabilities on PR
on:
pull_request:
types: [opened]
jobs:
snyk-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: snyk-python (requirements.txt)
uses: awshole/[email protected]
with:
snyk_api_key: ${{ secrets.SNYK_TOKEN }}
path_to_dependency_file: requirements.txt
upload_sarif: true
snyk_github_integration_token: ${{ github.token }}
repository: ${{ github.repository }}
- name: Delete existing directory power-snyk if it already exists
run: |
if [ -d "power-snyk" ]; then
rm -rf power-snyk
fi
- name: snyk-python (requirements-dev.txt)
uses: awshole/[email protected]
with:
snyk_api_key: ${{ secrets.SNYK_TOKEN }}
path_to_dependency_file: requirements-dev.txt
upload_sarif: true
snyk_github_integration_token: ${{ github.token }}
repository: ${{ github.repository }}
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ github.workspace }}/snyk.sarif