ARES - authorized red-team engagement automation with dashboard, campaign scope, module orchestration, OPSEC controls, encrypted vault, and reporting.
Python active-directorycloud-securitydefensive-validationfastapigood-first-issuemitre-attackopsecreactred-teamreportingsecurity
fix(tests): bind mock lots_audit_func directly to prevent module reload desync
Mafifrizi0cd132550109
diff --git a/tests/unit/test_structured_maintenance.py b/tests/unit/test_structured_maintenance.pyindex 4fb05e4..ec5fe12 100644--- a/tests/unit/test_structured_maintenance.py+++ b/tests/unit/test_structured_maintenance.py@@ -97,13 +97,15 @@ class TestStagedCollectionSafety:"checked_endpoints": ["m365_graph", "aws_s3", "azure_blob"],}- with patch("paramiko.SSHClient", return_value=mock_ssh), \- patch("ares.modules.exfil.staged_collection._audit_lots_egress_sync", return_value=mock_lots_result) as mock_lots:+ mock_lots = MagicMock(return_value=mock_lots_result)++ with patch("paramiko.SSHClient", return_value=mock_ssh):findings, raw = await mod.run(target="10.0.0.1",username="operator",destination="/tmp/stage",audit_lots_egress=True,+ lots_audit_func=mock_lots,)assert mock_lots.calledassert raw["lots_routes_open"] == ["m365_graph"]