From 4e2d7deb94d35e456fa2f5ee7a5f3bc2e2208a9b Mon Sep 17 00:00:00 2001 From: edoapra Date: Mon, 29 Jun 2026 14:53:32 -0700 Subject: [PATCH] fixes for bandit --- src/config/64_to_32.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config/64_to_32.py b/src/config/64_to_32.py index ac9613046a..485ab668a8 100644 --- a/src/config/64_to_32.py +++ b/src/config/64_to_32.py @@ -18,7 +18,7 @@ Optimizations applied: import os import sys import re -import subprocess +import subprocess # nosec B404 debug = False @@ -168,8 +168,9 @@ def process_file(file_path, patterns): print(f"Backup file: {filebak}") # Runs the Linux 'file' command - result = subprocess.run(['file', file_path], capture_output=True, text=True) + result = subprocess.run(['file', file_path], shell=False, capture_output=True, text=True) # nosec + # DOS files output contains "with CRLF line terminators" if "CRLF" in result.stdout: print(f"ERROR: DOS file with CRLF {file_path}", file=sys.stderr)