Skip to content

Commit d00a6be

Browse files
authored
Merge pull request #5 from star7js/pixeebot/drip-2024-06-23-pixee-python/sandbox-process-creation
2 parents 8a1c977 + 4530e0a commit d00a6be

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

python3/hackerutils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
import subprocess
66

77
from dotenv import Dotenv
8+
from security import safe_command
89

910

1011
def get_dotenv(filename='.env'):
1112
return Dotenv(str(pathlib.Path(__file__).parent / filename))
1213

1314

1415
def sh(*args):
15-
proc = subprocess.Popen(args, stdout=subprocess.PIPE)
16+
proc = safe_command.run(subprocess.Popen, args, stdout=subprocess.PIPE)
1617
stdout, _ = proc.communicate()
1718
return stdout
1819

python3/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ dotenv
22
twilio
33
yagmail
44
git+https://github.com/charlierguo/gmail
5+
security==1.2.1

0 commit comments

Comments
 (0)