Merge pull request #8 from ansh-info/integration #2
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
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 |