You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
M2: Unify graph edge and schema vocabulary used by analytics, auto-wiring, and tests #77
Hard-coded graph vocabulary has drifted from the canonical schemas, and the tests use the wrong vocabulary, so CI does not catch it:
GraphAnalyticsEngine.evaluate_deception groups services by edges with relation_type == "hosts" (src/ether/graph/analytics.py:361). Real edges are has_service from NetworkService.create (src/ether/schemas/network.py:73) and hosts_service from auto-wiring (src/ether/graph/store.py:907). The edge path never fires in production; only the host_ip fallback works. tests/unit/test_belief_engine.py:21,53,82 and tests/unit/test_graph_analytics.py:34 use "hosts", which is why it stays green.
The auto-wiring branch checks schema_type in ("vulnerability", "cve") (src/ether/graph/store.py:922). Real types are vulnerability.found and web.vulnerability; the branch is dead. tests/unit/test_storage_edges_and_deception.py:62-70 only exercises it by fabricating schema_type="vulnerability", a type nothing emits.
identify_critical_assets flags schema == "host_internal" (src/ether/graph/analytics.py:180). No schema or adapter emits that type, so the "internal corporate hosts" crown-jewel case can never trigger.
Acceptance criteria
Define shared constants/enums for relation types and schema types; use them in the store, auto-wiring and analytics.
Either wire vulnerability.found / web.vulnerability into auto-wiring or delete the dead branch.
Replace "hosts" test fixtures with edges the store actually writes and assert production-shaped rows.
Add a test where a service with no explicit parent is grouped to its host through the edge path and triggers port-sprawl detection.
Resolve or remove the host_internal crown-jewel branch.
Out of scope
Renaming relation types already persisted in existing databases (migration is separate).
http_probe wires network.service -[hosts_endpoint]-> web.endpoint, whereas ffuf-discovered web.endpoint nodes are persisted as orphaned nodes without hosts_endpoint edges from their parent network.service.
Activity
h45sh commentedon Dec 1, 2026
Observed auto-wiring gap:
http_probewiresnetwork.service -[hosts_endpoint]-> web.endpoint, whereasffuf-discoveredweb.endpointnodes are persisted as orphaned nodes withouthosts_endpointedges from their parentnetwork.service.