Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,36 @@ jobs:
export PYTHONPATH=$(pwd)
if [ -f bank_db.db ]; then rm -rf bank_db.db; fi
pytest tests/test_main.py -v
snyk-scan:
name: Snyk Security Scan
runs-on: ubuntu-latest
# needs: cd-tests

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libmariadb3 libmariadb-dev python3-dev build-essential pkg-config
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Snyk Scan
uses: snyk/actions/python@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test --json-file-output=snyk_report.json --severity-threshold=high
- name: Upload Snyk report
uses: actions/upload-artifact@v4
with:
name: snyk-report
path: snyk_report.json

32 changes: 32 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,35 @@ jobs:
run: |
export PYTHONPATH=$(pwd)
pytest tests/test_ci.py -v
snyk-scan:
name: Snyk Security Scan
runs-on: ubuntu-latest
# needs: ci-tests

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libmariadb3 libmariadb-dev python3-dev build-essential pkg-config
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Snyk Scan
uses: snyk/actions/python@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test --json-file-output=snyk_report.json
- name: Upload Snyk report
uses: actions/upload-artifact@v4
with:
name: snyk-report
path: snyk_report.json