Skip to content

Commit 28fff63

Browse files
Use pyproject.toml for bandit & exclude tests (#586)
* Since bandit now supports pyproject.toml as a config file, use that instead of cli options. * Exclude tests from bandit. There are many cases in tests where we might do something that violates bandit rules and that's ok. Co-authored-by: Timothy Pansino <[email protected]>
1 parent d7fc9cd commit 28fff63

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.mega-linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ PYTHON_FLAKE8_CONFIG_FILE: setup.cfg
2929
PYTHON_BLACK_CONFIG_FILE: pyproject.toml
3030
PYTHON_PYLINT_CONFIG_FILE: pyproject.toml
3131
PYTHON_ISORT_CONFIG_FILE: pyproject.toml
32+
PYTHON_BANDIT_CONFIG_FILE: pyproject.toml
33+
PYTHON_BANDIT_FILTER_REGEX_EXCLUDE: ./tests
3234

33-
# Bandit's next release supports pyproject.toml. Until then, add config by cli option
34-
PYTHON_BANDIT_ARGUMENTS: --skip=B110,B101,B404
3535
PYTHON_PYLINT_ARGUMENTS: "--fail-under=0 --fail-on=E"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ max-line-length = "120"
1515
good-names = "exc,val,tb"
1616

1717
[tool.bandit]
18-
skips = ["B110"]
18+
skips = ["B110", "B101", "B404"]

0 commit comments

Comments
 (0)