Skip to content

Add linter and lint existing files #15

Add linter and lint existing files

Add linter and lint existing files #15

Workflow file for this run

name: Security Scan
permissions:
security-events: write
contents: write
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
security_scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install safety bandit
- name: Run Safety check
run: safety check -r requirements.txt
continue-on-error: true
- name: Run Bandit
run: bandit -r . -f custom
continue-on-error: true
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL'
scanners: 'vuln,secret,config'
- name: Upload Trivy scan results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'