-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Security scan cron job workflow
Co-authored-by: Apoorva Gupta <apoorvaagupta.info@gmail.com>
- Loading branch information
1 parent
3d50beb
commit 7fd0d80
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
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
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 |