Skip to content

Commit

Permalink
feat: add static code analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
dartpain committed Feb 13, 2025
1 parent 2d8aa22 commit 1e3ae94
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/bandit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Bandit Security Scan

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
bandit_scan:
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install bandit # Bandit is needed for this action
if [ -f application/requirements.txt ]; then pip install -r application/requirements.txt; fi
- name: Run Bandit scan
uses: PyCQA/bandit-action@v1
with:
severity: MEDIUM
confidence: MEDIUM
targets: application/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1e3ae94

Please sign in to comment.