diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 71a6ece..3fd979e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,3 +11,10 @@ repos: - id: zizmor # Overrides the hook's own args, so keep its --no-progress (zizmor#582). args: ["--no-progress", "--no-online-audits"] + + # static security analysis + - repo: https://github.com/PyCQA/bandit + rev: '1.9.4' + hooks: + - id: bandit + args: ["-q", "-c", "pyproject.toml"] diff --git a/pyproject.toml b/pyproject.toml index da38a98..d833041 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,3 +50,6 @@ enable_error_code = ["import", "attr-defined"] [[tool.mypy.overrides]] module = 'sh.*' ignore_missing_imports = true + +[tool.bandit] +exclude_dirs = [".github", "docs", "test", "tests"]