Scan Python code with Bandit #17
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: Scan Python code with Bandit | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 3 * * *' | |
permissions: | |
contents: read | |
jobs: | |
bandit: | |
name: Bandit | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write | |
steps: | |
- name: Clone the git repo | |
uses: actions/checkout@v4 | |
- name: Install Bandit | |
run: pip install bandit bandit-sarif-formatter | |
- name: Run Bandit | |
run: | | |
bandit -c devops/bandit.config -r . --exit-zero -f sarif -o bandit_results.sarif | |
- uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: bandit_results.sarif |