Skip to content

Commit 182b7d9

Browse files
Add GitHub Actions workflow to run Bandit and upload SARIF security reports
- Added a GitHub Actions workflow that runs Bandit on the LiveInternetSpeedTester plugin source code. - Bandit scans for common Python security issues with medium severity and high confidence. - The workflow generates a SARIF report and uploads it to GitHub’s Security tab under Code Scanning Alerts. - Scheduled to run every Thursday at 18:39 UTC, and also runs on push and pull requests to the main branch. Directory scanned: ./addon/globalPlugins/LiveInternetSpeedTester
1 parent 51f71bc commit 182b7d9

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/bandit.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# GitHub Actions workflow to run Bandit and upload SARIF report to Security tab
2+
3+
name: Bandit Security Scan
4+
5+
on:
6+
push:
7+
branches: [ "main" ]
8+
pull_request:
9+
branches: [ "main" ]
10+
schedule:
11+
- cron: '39 18 * * 4' # Every Thursday at 18:39 UTC
12+
13+
jobs:
14+
bandit:
15+
name: Run Bandit on LiveInternetSpeedTester
16+
permissions:
17+
contents: read
18+
security-events: write
19+
actions: read
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout Repository
25+
uses: actions/checkout@v4
26+
27+
- name: Install Bandit
28+
run: pip install bandit
29+
30+
- name: Run Bandit with SARIF output
31+
run: |
32+
bandit -r addon/globalPlugins/LiveInternetSpeedTester -f sarif -o bandit-results.sarif --severity-level medium --confidence-level high
33+
34+
- name: Upload SARIF file to GitHub Security tab
35+
uses: github/codeql-action/upload-sarif@v2
36+
with:
37+
sarif_file: bandit-results.sarif

0 commit comments

Comments
 (0)