From 4259a12e6400bb8878220b261e5d0393612744f2 Mon Sep 17 00:00:00 2001 From: TPTBusiness Date: Wed, 29 Apr 2026 17:03:09 +0200 Subject: [PATCH] fix(security): use sys.executable in subprocess call (B603 #743) --- rdagent/scenarios/qlib/developer/factor_runner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rdagent/scenarios/qlib/developer/factor_runner.py b/rdagent/scenarios/qlib/developer/factor_runner.py index f8b15fad..9e6ef97b 100644 --- a/rdagent/scenarios/qlib/developer/factor_runner.py +++ b/rdagent/scenarios/qlib/developer/factor_runner.py @@ -1,3 +1,4 @@ +import sys import logging import os from pathlib import Path @@ -966,7 +967,7 @@ class QlibFactorRunner(CachedRunner[QlibFactorExperiment]): shutil.copy(str(full_data), str(tmp / "intraday_pv.h5")) ret = subprocess.run( - ["python", "factor.py"], + [sys.executable, "factor.py"], cwd=str(tmp), capture_output=True, timeout=300,