Skip to content

Commit

Permalink
Ignore bandit B603 errors for processed input
Browse files Browse the repository at this point in the history
  • Loading branch information
bgurney-rh committed Aug 8, 2023
1 parent c77528b commit 081e8ed
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/stratis_cli/_actions/_report_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ def report_pool(self):
)
)

# replace the lines below with the correct call to lsblk
blkdevs = [dev.Devnode() for dev in modevs]
subprocess.run(["/usr/bin/lsblk", "-i"] + blkdevs, check=True)
# Ignore bandit B603 errors. Input comes from D-Bus and has
# been processed.
subprocess.run(["/usr/bin/lsblk", "-i"] + blkdevs, check=True) # nosec B603


class Stopped(Report): # pylint: disable=too-few-public-methods
Expand Down Expand Up @@ -154,7 +155,8 @@ def selection_func(_uuid, info):
if stopped_pool is None:
raise StratisCliResourceNotFoundError("list", selection_value)

# Substitute lsblk call here
# Ignore bandit B603 errors. Input comes from D-Bus and has
# been processed.
for dev in stopped_pool["devs"]:
print(dev)
subprocess.run(["/usr/bin/lsblk", "-i", str(dev)], check=True)
subprocess.run(["/usr/bin/lsblk", "-i", str(dev)], check=True) # nosec B603

0 comments on commit 081e8ed

Please sign in to comment.