Skip to content

Commit 3895458

Browse files
authored
Merge pull request trustyai-explainability#32 from ruivieira/bandit-assert
chore: Ignore Bandit's assert warnings in tests
2 parents 149065f + 2e5c33c commit 3895458

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.bandit.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Ignore B101 (assert_used) only for files under tests/ (recursive)
2+
assert_used:
3+
skips:
4+
- "./tests/*.py"
5+
- "./tests/*/*.py"
6+
- "./tests/*/*/*.py"
7+
- "./tests/*/*/*/*.py"

.github/workflows/security.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
uses: PyCQA/bandit-action@67a458d90fa11fb1463e91e7f4c8f068b5863c7f
9393
with:
9494
targets: "."
95+
configfile: ".bandit.yaml"
9596

9697
- name: Upload SARIF results to Security tab
9798
if: github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)