Skip to content

Commit 048089d

Browse files
[MERGE]
* feature-unleash-bandit-164: Tune .bandit.yml Create .bandit.yml [TESTING] Update bandit.yml (- WIP #164 -)
2 parents 2703d2c + e67887e commit 048089d

File tree

2 files changed

+65
-3
lines changed

2 files changed

+65
-3
lines changed

.bandit.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# .bandit.yml
2+
# Strict configuration for Bandit to enforce comprehensive security checks.
3+
4+
# Define the directories to exclude from scanning.
5+
exclude_dirs:
6+
[]
7+
8+
# Specify files or directories to skip.
9+
skipped_files:
10+
[]
11+
12+
# Indicate the targets to scan.
13+
targets:
14+
- "."
15+
16+
# Configure plugins (tests).
17+
plugins:
18+
# Include all tests for strict scanning.
19+
include:
20+
- "*"
21+
# Exclude no tests.
22+
exclude:
23+
- ""
24+
25+
# Set the severity levels to report.
26+
# Including all levels ensures that even minor issues are reported.
27+
severity:
28+
- LOW
29+
- MEDIUM
30+
- HIGH
31+
32+
# Set the confidence levels to report.
33+
# Including all levels to catch all potential issues.
34+
confidence:
35+
- MEDIUM
36+
- HIGH
37+
38+
# Specify the output format for the reports.
39+
format: "txt"
40+
41+
# Include code snippets in the output for easier debugging.
42+
show_code: true
43+
44+
# Define profiles if needed.
45+
profiles:
46+
full_audit:
47+
include:
48+
- "*"
49+
exclude:
50+
- ""
51+
fast_audit:
52+
include:
53+
- "multicast/*"
54+
exclude:
55+
- "tests/*"
56+
57+
# Enable recursive scanning to cover all subdirectories.
58+
recursive: true
59+
60+
# Disable any inline skips to ensure all code is analyzed.
61+
inline_skips: false

.github/workflows/bandit.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
bandit:
2525
permissions:
2626
contents: read # for actions/checkout to fetch code
27+
statuses: write
2728
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
2829
runs-on: ubuntu-latest
2930
steps:
@@ -32,15 +33,15 @@ jobs:
3233
uses: reactive-firewall/[email protected]
3334
with: # optional arguments
3435
# exit with 0, even with results found
35-
exit_zero: true # optional, default is DEFAULT
36+
exit_zero: false # optional, default is DEFAULT
3637
# Github token of the repository (automatically created by Github)
3738
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information.
3839
# File or directory to run bandit on
3940
path: "." # optional, default is .
4041
# Report only issues of a given severity level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything)
41-
level: medium # optional, default is UNDEFINED
42+
# level: MEDIUM # optional, default is UNDEFINED
4243
# Report only issues of a given confidence level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything)
43-
confidence: high # optional, default is UNDEFINED
44+
confidence: LOW # optional, default is UNDEFINED
4445
# comma-separated list of paths (glob patterns supported) to exclude from scan (note that these are in addition to the excluded paths provided in the config file) (default: .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg)
4546
# excluded_paths: # optional, default is DEFAULT
4647
# comma-separated list of test IDs to skip

0 commit comments

Comments
 (0)