Skip to content

Commit

Permalink
Add dependency: bandit
Browse files Browse the repository at this point in the history
  • Loading branch information
acmacunlay committed Oct 8, 2024
1 parent f52891a commit 372d14c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
run: |
mypy .
- name: Run unit tests
- name: Run common security issue checker
run: |
pytest .
bandit -c pyproject.toml -r .
- name: Run unit tests + code coverage
run: |
coverage run -m pytest .
14 changes: 13 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,16 @@ classifiers = [
]

[project.optional-dependencies]
dev = ["build", "coverage", "mypy", "pytest", "ruff", "setuptools", "twine"]
dev = [
"bandit",
"build",
"coverage",
"mypy",
"pytest",
"ruff",
"setuptools",
"twine",
]

[project.urls]
Homepage = "https://github.com/acmacunlay/pywaveshare"
Expand All @@ -48,3 +57,6 @@ Changelog = "https://github.com/acmacunlay/pywaveshare/blob/main/CHANGELOG.md"
[[tool.mypy.overrides]]
module = ["RPi", "RPi.GPIO", "serial"]
ignore_missing_imports = true

[tool.bandit]
exclude_dirs = ["tests", ".venv"]
2 changes: 1 addition & 1 deletion src/pywaveshare/boards/sim868/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def __processData(self):
rawData = match[0][1].split(",")
self.__GPRSIPaddress = rawData[2].replace('"', "")

if self.__GPRSIPaddress != "0.0.0.0":
if self.__GPRSIPaddress != "0.0.0.0": # nosec
self.__GPRSready = True
else:
self.__GPRSready = False
Expand Down

0 comments on commit 372d14c

Please sign in to comment.