Skip to content

Commit

Permalink
codacy compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck committed Oct 21, 2023
1 parent 05fd828 commit 289efec
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
8 changes: 0 additions & 8 deletions .bandit.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# https://bandit.readthedocs.io
# filename must be like this, so codacy can pick it up: https://github.com/codacy/codacy-bandit/blob/master/src/main/scala/codacy/bandit/Bandit.scala#L35C49-L35C59

exclude_dirs:
- docs
- .venv

skips:
- B101
2 changes: 1 addition & 1 deletion cyclonedx/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def sha1sum(filename: str) -> str:
Returns:
SHA-1 hash
"""
h = sha1() # nosec B303,B324
h = sha1() # nosec B303, B324
with open(filename, 'rb') as f:
for byte_block in iter(lambda: f.read(4096), b''):
h.update(byte_block)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ commands =

[testenv:bandit]
commands =
poetry run bandit -c .bandit.yaml -v
poetry run bandit -c bandit.yml -v -r cyclonedx tests examples tools


0 comments on commit 289efec

Please sign in to comment.