From 16759a45a914da1675f8386028f9ac7dbb7a03fa Mon Sep 17 00:00:00 2001 From: orbisai0security Date: Wed, 20 May 2026 12:31:47 +0000 Subject: [PATCH] fix: V-002 security vulnerability Automated security fix generated by OrbisAI Security --- MC/bin/o2_dpg_workflow_runner.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MC/bin/o2_dpg_workflow_runner.py b/MC/bin/o2_dpg_workflow_runner.py index 229125c3c..576d2d23a 100755 --- a/MC/bin/o2_dpg_workflow_runner.py +++ b/MC/bin/o2_dpg_workflow_runner.py @@ -110,8 +110,10 @@ def setup_logger(name, log_file, level=logging.INFO): # TODO: integrate into standard logger def send_webhook(hook, t): if hook!=None: - command="curl -X POST -H 'Content-type: application/json' --data '{\"text\":\" " + str(t) + "\"}' " + str(hook) + " &> /dev/null" - os.system(command) + import json + data = json.dumps({"text": " " + str(t)}) + subprocess.run(["curl", "-X", "POST", "-H", "Content-type: application/json", "--data", data, str(hook)], + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) # A fallback solution to getting all child procs # in case psutil has problems (PermissionError).