diff --git a/.github/workflows/bandit.yml b/.github/workflows/bandit.yml new file mode 100644 index 0000000000..9f33f18c31 --- /dev/null +++ b/.github/workflows/bandit.yml @@ -0,0 +1,32 @@ +name: Bandit Security Analysis + +on: + pull_request: + branches: [develop] + +permissions: + contents: read + +jobs: + bandit: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.8' + - name: Install Bandit + run: | + python -m pip install --upgrade pip + pip install bandit + - name: Run Bandit + run: | + bandit -r . -f json -o bandit-results.json || true + - name: Upload Bandit Results + uses: actions/upload-artifact@v3 + with: + name: bandit-results + path: bandit-results.json \ No newline at end of file