Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Bandit scan GitHub Action #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/bandit-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Bandit Scan

on: [push, pull_request]

jobs:
bandit-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bandit Scan
uses: shundor/python-bandit-scan@9cc5aa4a006482b8a7f91134412df6772dbda22c
with:
exit_zero: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,26 @@ cat ./etsthore.json
}
]
```

## Bandit Scan GitHub Action

To use the Bandit scan GitHub Action for running a security scan on your Python project, you can follow the example GitHub Actions configuration below:

```yaml
name: Bandit Scan

on: [push, pull_request]

jobs:
bandit-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bandit Scan
uses: shundor/python-bandit-scan@9cc5aa4a006482b8a7f91134412df6772dbda22c
with:
exit_zero: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

This configuration will run the Bandit scan on your Python project whenever there is a push or pull request. The `exit_zero: true` option ensures that the scan does not fail the workflow even if issues are found. The `GITHUB_TOKEN` is provided via `${{ secrets.GITHUB_TOKEN }}` for authentication.
Empty file added git rebase HEAD~2 --signoff
Empty file.
Loading