Introduce a hierarchical risk assessment model with six entity types: - Risk Assessment: top-level container scoped to an organization - Risk Assessment Scope: sub-container for scoping threat modeling exercises within an assessment - Risk Assessment Node: DFD elements typed as ENTITY, BOUNDARY, ASSET, or DATA within a scope - Risk Assessment Process: directed data flows between two nodes - Risk Assessment Threat: descriptive threats attached to a process with a free-text category (e.g. Confidentiality, Integrity) - Risk Scenario: thin join linking a threat to a risk from the register, carrying only a name and description Risk scoring (likelihood, impact, treatment) remains on the existing Risk entity. Threats are purely descriptive. Risk Scenarios connect the threat model to the risk register without duplicating scores. Backend: migration with PG enum for node types, coredata structs, service layer with full CRUD and validation, GraphQL schema with 18 mutations and paginated connections, authorization actions and policies, and base_resolvers.go Node dispatch for all entity types. Frontend: Risk Assessments list page with create dialog, detail page showing scopes as cards with nodes/processes/threats tables, inline create/edit/delete actions on all entities, and a Scenarios tab on the Risk detail page linking threats to risks. Existing RiskGraph.ts hook file removed in favor of colocated queries in page files. E2E tests cover CRUD for all entity types, RBAC, and tenant isolation. Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
6.6 KiB
6.6 KiB