Skip to content

Commit

Permalink
Sandbox Process Creation
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeebot authored and drdavella committed Dec 20, 2023
1 parent 671c820 commit 54bd876
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies = [
"click",
"prompt-toolkit",
"questionary~=2.0.0",
"security~=1.2.0",
]

[project.urls]
Expand Down
7 changes: 5 additions & 2 deletions src/pixee/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

from ._version import __version__
from .logo import logo2 as logo
from security import safe_command

# Enable overrides for local testing purposes
PYTHON_CODEMODDER = os.environ.get("PIXEE_PYTHON_CODEMODDER", "pixee-python-codemods")
Expand Down Expand Up @@ -159,7 +160,8 @@ def run_codemodder(
f"Applying {num_codemods} {language} codemods",
total=num_codemods,
)
command = subprocess.Popen(
command = safe_command.run(
subprocess.Popen,
[codemodder, "--output", codetf.name, path] + common_codemodder_args,
stderr=subprocess.PIPE,
stdout=subprocess.PIPE if not verbose else None,
Expand Down Expand Up @@ -438,7 +440,8 @@ def summarize_results(combined_codetf):

@lru_cache()
def list_codemods(codemodder: str):
result = subprocess.run(
result = safe_command.run(
subprocess.run,
[codemodder, "--list"],
stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL,
Expand Down

0 comments on commit 54bd876

Please sign in to comment.