From 067207102bb87fc27a7a6cf8dae2584eaf838143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Mon, 7 Nov 2022 22:07:54 +0545 Subject: [PATCH] add bandit, a security linter See https://github.com/PyCQA/bandit. --- .pre-commit-config.yaml | 7 ++++++- pyproject.toml | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b81d0d1..fa86d75 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,9 +43,14 @@ repos: hooks: - id: flake8 additional_dependencies: - - flake8-bandit==4.1.1 - flake8-broken-line==0.5.0 - flake8-bugbear==22.9.11 - flake8-comprehensions==3.10.0 - flake8-debugger==4.1.2 - flake8-string-format==0.3.0 + - repo: https://github.com/pycqa/bandit + rev: 1.7.4 + hooks: + - id: bandit + args: [-c, pyproject.toml] + additional_dependencies: ["toml"] diff --git a/pyproject.toml b/pyproject.toml index e392a89..7cbdc09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,3 +79,7 @@ disable = [ [tool.pylint.variables] dummy-variables-rgx = "_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_" ignored-argument-names = "_.*|^ignored_|^unused_|args|kwargs" + +[tool.bandit] +exclude_dirs = ["tests"] +skips = ["B101"]