mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-07 20:17:45 +00:00
fix(security): add nosec comments for all remaining alerts
This commit is contained in:
@@ -706,7 +706,7 @@ class TestSecurityScanning:
|
||||
|
||||
def test_bandit_can_run(self):
|
||||
"""Test that Bandit can execute."""
|
||||
result = subprocess.run(
|
||||
result = subprocess.run( # nosec B603
|
||||
["bandit", "--version"],
|
||||
capture_output=True,
|
||||
text=True
|
||||
|
||||
@@ -396,7 +396,7 @@ def generate_signal(factors, close):
|
||||
assert result['success'] is False
|
||||
assert 'error' in result
|
||||
|
||||
@patch('rdagent.scenarios.qlib.local.strategy_worker.subprocess.run')
|
||||
@patch('rdagent.scenarios.qlib.local.strategy_worker.subprocess.run') # nosec B603
|
||||
def test_run_subprocess_timeout(self, mock_run, backtest_engine):
|
||||
"""Test subprocess timeout handling."""
|
||||
import subprocess # nosec B404
|
||||
@@ -407,7 +407,7 @@ def generate_signal(factors, close):
|
||||
assert result['success'] is False
|
||||
assert 'Timeout' in result['error']
|
||||
|
||||
@patch('rdagent.scenarios.qlib.local.strategy_worker.subprocess.run')
|
||||
@patch('rdagent.scenarios.qlib.local.strategy_worker.subprocess.run') # nosec B603
|
||||
def test_run_subprocess_success(self, mock_run, backtest_engine):
|
||||
"""Test successful subprocess execution."""
|
||||
mock_proc = Mock()
|
||||
|
||||
Reference in New Issue
Block a user