feat(graph): [2/3] node population and edge detection
Open
@TFT444 is already working on this.
Since Sep 5, 2026.
core
enhancement
roadmap
- Dominant language
- Python
- Stars
- 57
- Forks
- 68
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 17
Description
Objective
After each scan, populate the graph with resource nodes from the
InventorySnapshot and infer edges between them with evidence provenance.
Depends on: #331
Scope
Node population (scanner/graph/node_service.py)
- Upsert graph_nodes from snapshot.resources keyed on (tenant_id, resource_id)
- Link each finding to its node via finding_graph_nodes
- Run as a post-scan step; failure logs but does not fail the scan
Edge detection (scanner/graph/edge_detector.py)
- EdgeDetector base class: detect(snapshot, nodes) -> list[GraphEdge]
- Initial detectors:
- NsgToSubnet (PROTECTS)
- SubnetToResource (MEMBER_OF)
- PublicIpToResource (EXPOSES)
- IdentityToResource (HAS_IDENTITY)
- StoragePrivateEndpoint (REACHABLE_VIA)
- Confidence: ARG-confirmed 1.0, inferred from properties 0.8,
cross-referenced 0.6 - Upsert edges on each scan; no duplicates
Test plan
- Mock snapshot produces correct nodes, no duplicates on re-scan
- All findings link to a node after scan
- Each detector tested with fixture snapshots
- No cross-tenant nodes or edges
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.