Skip to content

Commit 372d14c

Browse files
committed
Add dependency: bandit
1 parent f52891a commit 372d14c

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

.github/workflows/pipeline.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ jobs:
5454
run: |
5555
mypy .
5656
57-
- name: Run unit tests
57+
- name: Run common security issue checker
5858
run: |
59-
pytest .
59+
bandit -c pyproject.toml -r .
60+
61+
- name: Run unit tests + code coverage
62+
run: |
63+
coverage run -m pytest .

pyproject.toml

+13-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,16 @@ classifiers = [
3838
]
3939

4040
[project.optional-dependencies]
41-
dev = ["build", "coverage", "mypy", "pytest", "ruff", "setuptools", "twine"]
41+
dev = [
42+
"bandit",
43+
"build",
44+
"coverage",
45+
"mypy",
46+
"pytest",
47+
"ruff",
48+
"setuptools",
49+
"twine",
50+
]
4251

4352
[project.urls]
4453
Homepage = "https://github.com/acmacunlay/pywaveshare"
@@ -48,3 +57,6 @@ Changelog = "https://github.com/acmacunlay/pywaveshare/blob/main/CHANGELOG.md"
4857
[[tool.mypy.overrides]]
4958
module = ["RPi", "RPi.GPIO", "serial"]
5059
ignore_missing_imports = true
60+
61+
[tool.bandit]
62+
exclude_dirs = ["tests", ".venv"]

src/pywaveshare/boards/sim868/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def __processData(self):
320320
rawData = match[0][1].split(",")
321321
self.__GPRSIPaddress = rawData[2].replace('"', "")
322322

323-
if self.__GPRSIPaddress != "0.0.0.0":
323+
if self.__GPRSIPaddress != "0.0.0.0": # nosec
324324
self.__GPRSready = True
325325
else:
326326
self.__GPRSready = False

0 commit comments

Comments
 (0)