Sandbox Process Creation

This commit is contained in:
pixeebot[bot]
2025-03-18 03:41:40 +00:00
committed by GitHub
parent 2e7ed15038
commit aed629068f
6 changed files with 19 additions and 20 deletions

View File

@@ -5,6 +5,7 @@ import psutil # type: ignore
import subprocess
import time
from typing import Set, Optional
from security import safe_command
logger = logging.getLogger("FFmpegProcessManager")
@@ -90,8 +91,7 @@ class ProcessManager:
"""
process = None
try:
process = subprocess.Popen(
command,
process = safe_command.run(subprocess.Popen, command,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True