Skip to content

Commit

Permalink
Avoid ruff/flake8-bandit rules S603/S607 in tests
Browse files Browse the repository at this point in the history
S603 `subprocess` call: check for execution of untrusted input
  • Loading branch information
DimitriPapadopoulos committed Jul 2, 2024
1 parent 0f93e5b commit d3a28d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codespell_lib/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def run_codespell(
) -> int:
"""Run codespell."""
args = tuple(str(arg) for arg in args)
proc = subprocess.run(
proc = subprocess.run( # noqa: S603
["codespell", "--count", *args], # noqa: S607
cwd=cwd,
capture_output=True,
Expand Down Expand Up @@ -1344,7 +1344,7 @@ def run_codespell_stdin(
cwd: Optional[Path] = None,
) -> int:
"""Run codespell in stdin mode and return number of lines in output."""
proc = subprocess.run(
proc = subprocess.run( # noqa: S603
["codespell", *args, "-"], # noqa: S607
cwd=cwd,
input=text,
Expand Down

0 comments on commit d3a28d8

Please sign in to comment.