Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bandit in pre-commit hook and update linters #4

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions {{ cookiecutter.repo_name }}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:

# PEP 8 compliant opinionated formatter.
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.10.1
hooks:
- id: black
exclude: (docs/)
Expand All @@ -23,7 +23,7 @@ repos:

# Cleaning unused imports.
- repo: https://github.com/hadialqattan/pycln
rev: v2.2.2
rev: v2.3.0
hooks:
- id: pycln
args: ["-a"]
Expand Down Expand Up @@ -84,8 +84,9 @@ repos:
# ["--extension-pkg-whitelist=pydantic"]

# Finds common security issues in Python code.
- repo: https://github.com/Lucas-C/pre-commit-hooks-bandit
rev: v1.0.6
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: python-bandit-vulnerability-check
args: [-c, pyproject.toml, --recursive, src, -ll]
- id: bandit
args: [-c, pyproject.toml, --recursive, src]
additional_dependencies: [".[toml]"] # required for pyproject.toml support
3 changes: 3 additions & 0 deletions {{ cookiecutter.repo_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,6 @@ min-similarity-lines=10

[tool.bandit]
exclude_dirs = ["venv",]
# B101 disables errors for asserts in the code
# remember to not use asserts for security and control flows
skips = ["B101"]
Loading