From d4f6697c193da6f6bc953a8012b297f2228336e7 Mon Sep 17 00:00:00 2001 From: Arun Siluvery Date: Wed, 6 Sep 2023 12:59:19 +0100 Subject: [PATCH] Specify bandit arguments using yaml file Bandit not respecting values provided in .bandit file because of a known issue https://github.com/PyCQA/bandit/issues/488 --- .bandit | 2 -- .circleci/config.yml | 2 +- bandit.yaml | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 .bandit create mode 100644 bandit.yaml diff --git a/.bandit b/.bandit deleted file mode 100644 index d3cdff41..00000000 --- a/.bandit +++ /dev/null @@ -1,2 +0,0 @@ -[bandit] -exclude: /mail/tests,/.venv,/static/management diff --git a/.circleci/config.yml b/.circleci/config.yml index bc899217..75d46000 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -89,7 +89,7 @@ jobs: - run: name: Bandit command: | - pipenv run bandit -r . + pipenv run bandit -c bandit.yaml -r . check_background_tasks_up: machine: diff --git a/bandit.yaml b/bandit.yaml new file mode 100644 index 00000000..6636fa41 --- /dev/null +++ b/bandit.yaml @@ -0,0 +1,2 @@ +exclude_dirs: ['mail/tests', '.venv', '.git', 'tests'] +skips: ['B101']