Skip to content

Commit

Permalink
Add bandit to pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ericof committed Nov 8, 2023
1 parent 4f4714e commit ac751be
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ towncrier_issue_format = "[#{issue}](https://github.com/collective/pas.plugins.o
extra_lines = """
[tool.coverage.run]
omit = ["*/locales/*"]
[tool.bandit]
targets = "src/pas/plugins/oidc"
exclude_dirs = ["src/pas/plugins/oidc/locales"]
"""

[gitignore]
Expand All @@ -42,3 +46,13 @@ jobs = [
"dependencies",
"release_ready",
]

[pre_commit]
extra_lines = """
- repo: https://github.com/PyCQA/bandit
rev: '1.7.5'
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
"""
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ repos:
# """
##

- repo: https://github.com/PyCQA/bandit
rev: '1.7.5'
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]

##
# Add extra configuration options in .meta.toml:
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ ignore = [
[tool.coverage.run]
omit = ["*/locales/*"]

[tool.bandit]
targets = "src/pas/plugins/oidc"
exclude_dirs = ["src/pas/plugins/oidc/locales"]

##
# Add extra configuration options in .meta.toml:
# [pyproject]
Expand Down

0 comments on commit ac751be

Please sign in to comment.