diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cc9a67b5a..f7eca7e67 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,6 +34,13 @@ repos: - --license-filepath - docs/file_header.txt + - repo: https://github.com/pycqa/bandit + rev: 1.7.9 + hooks: + - id: bandit + args: + - --configfile=pyproject.toml + - repo: https://github.com/pycqa/isort rev: 5.13.2 hooks: diff --git a/pyproject.toml b/pyproject.toml index eec8b297a..0d55cd3e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,9 @@ Documentation = "https://python-holidays.readthedocs.io/en/latest/" Changelog = "https://github.com/vacanza/python-holidays/releases" Downloads = "https://pypi.org/project/holidays/" +[tool.bandit] +exclude_dirs = ["docs", "tests"] + [tool.coverage.run] branch = true omit = ["scripts/*", "setup.py", "tests/*"]