Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# See the LICENSE file for more information.
#
import argparse
import shlex
import subprocess
import sys
import os
Expand All @@ -15,7 +16,8 @@ def run_cmd(cmd: str, env: dict[str, str] | None = None) -> int:
if env is None:
env = os.environ.copy()
print(f"Running: {cmd}")
result = subprocess.run(cmd, shell=True, check=True, env=env)
# Use shell=False to avoid shell injection vulnerabilities
result = subprocess.run(shlex.split(cmd), shell=False, check=True, env=env)
return result.returncode


Expand Down
Loading