Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

fix(ci): cryptography dep for fusion tests + assert routes on assembled app

Beenu Aroraf8698bfa37cb
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 169bb994a..42faa431b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -385,7 +385,7 @@ jobs:
# archives normalized events into the ClickHouse event lake.
# pyyaml: required since Phase A2 — the detection-matcher parity test
# loads the canonical scripts/generate_detections.py (imports yaml).
- run: pip install --quiet pydantic pydantic-settings pytest pytest-asyncio structlog redis aioredis fastapi httpx aiokafka asyncpg clickhouse-driver pyyaml
+ run: pip install --quiet pydantic pydantic-settings pytest pytest-asyncio structlog redis aioredis fastapi httpx aiokafka asyncpg clickhouse-driver pyyaml cryptography
- name: Install pytest-cov (Phase 2.2 coverage gate)
run: pip install --quiet 'pytest-cov>=4,<7'
# Phase 2.2 — every wave-1 service now has a measured coverage
diff --git a/services/api/tests/test_replay_publish.py b/services/api/tests/test_replay_publish.py
index efe56801f..176b665aa 100644
--- a/services/api/tests/test_replay_publish.py
+++ b/services/api/tests/test_replay_publish.py
@@ -97,12 +97,15 @@ def test_snapshot_shape_and_counts() -> None:
def test_routes_registered() -> None:
+ # Assert against the fully-assembled FastAPI app (its routes carry the
+ # resolved `/api/v1/...` paths), not the pre-mount APIRouter — the latter's
+ # stored paths depend on include-order/prefix internals.
try:
- from app.api.v1.router import api_router
+ from app.main import app
except ModuleNotFoundError as exc: # pragma: no cover - local envs missing runtime deps
pytest.skip(f"API runtime dependency unavailable in this environment: {exc.name}")
- paths = {getattr(r, "path", "") for r in api_router.routes}
+ paths = {getattr(r, "path", "") for r in app.routes}
assert "/api/v1/ledger/{run_id}/publish" in paths
assert "/api/v1/ledger/{run_id}/publish/preview" in paths
assert "/api/v1/r/{slug}" in paths