Skip to content

Commit

Permalink
Add: Security scan cron job workflow
Browse files Browse the repository at this point in the history
Co-authored-by: Apoorva Gupta <apoorvaagupta.info@gmail.com>
  • Loading branch information
ansh-info and apoorva-info committed Jan 18, 2025
1 parent 3d50beb commit 7fd0d80
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Security Scan

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
schedule:
- cron: "0 0 * * 0" # Run weekly

jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install bandit safety
- name: Run Bandit
run: |
bandit -r code/ app/ -ll
- name: Run Safety Check
run: |
safety check
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/python@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor

0 comments on commit 7fd0d80

Please sign in to comment.