Bandit Check #8
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: Bandit Check | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '5 23 * * 1' | |
push: | |
paths: | |
- .github/workflows/bandit-check.yml | |
permissions: read-all | |
jobs: | |
bandit-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
- name: Bandit check | |
run: | | |
pip install bandit | |
bandit -c bandit.yml -r ./scripts ./test --exit-zero -f custom --msg-template \ | |
"{relpath}:{line:<4} {test_id}[bandit]:{severity}: {msg}" | |
bandit -c bandit.yml -r ./scripts ./test --exit-zero -f html -o bandit_report.html | |
- name: Upload report to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Bandit Report | |
path: bandit_report.html |