Skip to content

armgit / ARES

Public Imported from GitHub
0

ARES - authorized red-team engagement automation with dashboard, campaign scope, module orchestration, OPSEC controls, encrypted vault, and reporting.

test: isolate webhook config from local env

Mafifrizi1a83533b3f2a
diff --git a/.env.example b/.env.example
index a759731..455241c 100644
--- a/.env.example
+++ b/.env.example
@@ -62,7 +62,8 @@ ARES_DEFAULT_JITTER_MIN_MS=500
ARES_DEFAULT_JITTER_MAX_MS=3000
# ── Webhook Notifications (optional) ──────────────────────────────────────────
-ARES_WEBHOOK_URL= # Slack/Teams/generic webhook URL
+# Slack/Teams/generic webhook URL. Leave blank to disable webhook notifications.
+ARES_WEBHOOK_URL=
ARES_WEBHOOK_ON_SEVERITY=critical,high # Severities to alert on
ARES_WEBHOOK_TIMEOUT=5.0 # HTTP timeout seconds
ARES_WEBHOOK_RETRY=2 # Max retries on failure
diff --git a/tests/conftest.py b/tests/conftest.py
index 93a819e..9676215 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -30,10 +30,16 @@ if str(_REPO_ROOT) not in sys.path:
@pytest.fixture(autouse=True, scope="session")
def set_test_env():
"""Set required env vars for the entire test session."""
+ original_webhook_url = os.environ.get("ARES_WEBHOOK_URL")
os.environ.setdefault("ARES_SECRET_KEY", "test-secret-key-min-32-chars-placeholder!!")
os.environ.setdefault("ARES_ENCRYPTION_KEY", "test-enc-key-min-32-chars-placeholder-32!!")
os.environ.setdefault("ARES_DEFAULT_ADMIN_PASSWORD", "TestPassword1!")
+ os.environ["ARES_WEBHOOK_URL"] = ""
yield
+ if original_webhook_url is not None:
+ os.environ["ARES_WEBHOOK_URL"] = original_webhook_url
+ else:
+ os.environ.pop("ARES_WEBHOOK_URL", None)
# ── Temporary directories ─────────────────────────────────────────────────────