From 081e8edc78d05276d42d64ebf7a8d5d3413eadda Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Tue, 8 Aug 2023 15:01:14 -0400 Subject: [PATCH] Ignore bandit B603 errors for processed input --- src/stratis_cli/_actions/_report_pool.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/stratis_cli/_actions/_report_pool.py b/src/stratis_cli/_actions/_report_pool.py index 19759b1f7..e7877b0c8 100644 --- a/src/stratis_cli/_actions/_report_pool.py +++ b/src/stratis_cli/_actions/_report_pool.py @@ -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 @@ -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