Skip to content

Commit 83ef33a

Browse files
committed
chore(security): document safe subprocess runtime check
1 parent a9e90eb commit 83ef33a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/yt_channel_downloader/classes/node_runtime_notifier.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from pathlib import Path
66
import shutil
7-
import subprocess
7+
import subprocess # nosec B404 - only used with fixed argv lists and validated absolute executable paths
88

99
from PyQt6.QtWidgets import QMessageBox, QCheckBox
1010
from PyQt6.QtCore import QUrl
@@ -61,7 +61,8 @@ def _has_working_js_runtime(self) -> bool:
6161
continue
6262
try:
6363
subprocess.run([runtime_path, "--version"], check=True, # nosec B603
64-
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=2)
64+
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
65+
timeout=2, shell=False)
6566
logger.debug("%s detected at %s", binary, runtime_path)
6667
return True
6768
except Exception: # noqa: BLE001

0 commit comments

Comments
 (0)