Add risk assessment boundary model
Introduce RiskAssessmentBoundary as a first-class, self-nesting entity that
groups nodes within a risk assessment scope, and thread it through every
surface.
- coredata: new risk_assessment_boundaries table + migration, boundary_id on
nodes, self-referential parent_boundary_id, entity type registration
- riskmanagement: boundary CRUD service methods, boundary_id wiring on node
create/update, scope-membership and self-parent validation, nested-subgraph
Mermaid rendering
- IAM: core:risk-assessment-boundary:{get,list,create,update,delete} actions
and viewer/auditor read policies
- console GraphQL: RiskAssessmentBoundary type, connection, order enum, CRUD
mutations, boundaries field on scope, boundaryId on nodes
- CLI: risk-assessment boundary command group and --boundary-id on nodes
- MCP: boundary tools and boundary_id on node tools
- n8n: boundary operations and boundary fields on node operations
- console UI: boundary list/create/edit, boundary selector on nodes, diagram
refetch on boundary changes
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -58,9 +58,10 @@ type createResponse struct {
|
||||
|
||||
func NewCmdCreate(f *cmdutil.Factory) *cobra.Command {
|
||||
var (
|
||||
flagScopeId string
|
||||
flagNodeType string
|
||||
flagName string
|
||||
flagScopeId string
|
||||
flagBoundaryId string
|
||||
flagNodeType string
|
||||
flagName string
|
||||
)
|
||||
|
||||
cmd := &cobra.Command{
|
||||
@@ -106,7 +107,6 @@ func NewCmdCreate(f *cmdutil.Factory) *cobra.Command {
|
||||
Title("Node type").
|
||||
Options(
|
||||
huh.NewOption("Entity", "ENTITY"),
|
||||
huh.NewOption("Boundary", "BOUNDARY"),
|
||||
huh.NewOption("Asset", "ASSET"),
|
||||
huh.NewOption("Data", "DATA"),
|
||||
).
|
||||
@@ -126,7 +126,7 @@ func NewCmdCreate(f *cmdutil.Factory) *cobra.Command {
|
||||
return fmt.Errorf("node type is required; pass --node-type or run interactively")
|
||||
}
|
||||
|
||||
if err := cmdutil.ValidateEnum("node-type", flagNodeType, []string{"ENTITY", "BOUNDARY", "ASSET", "DATA"}); err != nil {
|
||||
if err := cmdutil.ValidateEnum("node-type", flagNodeType, []string{"ENTITY", "ASSET", "DATA"}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -136,6 +136,10 @@ func NewCmdCreate(f *cmdutil.Factory) *cobra.Command {
|
||||
"name": flagName,
|
||||
}
|
||||
|
||||
if flagBoundaryId != "" {
|
||||
input["boundaryId"] = flagBoundaryId
|
||||
}
|
||||
|
||||
data, err := client.Do(
|
||||
createMutation,
|
||||
map[string]any{"input": input},
|
||||
@@ -162,7 +166,8 @@ func NewCmdCreate(f *cmdutil.Factory) *cobra.Command {
|
||||
}
|
||||
|
||||
cmd.Flags().StringVar(&flagScopeId, "scope-id", "", "Risk assessment scope ID (required)")
|
||||
cmd.Flags().StringVar(&flagNodeType, "node-type", "", "Node type: ENTITY, BOUNDARY, ASSET, DATA (required)")
|
||||
cmd.Flags().StringVar(&flagBoundaryId, "boundary-id", "", "Boundary ID that contains this node (optional)")
|
||||
cmd.Flags().StringVar(&flagNodeType, "node-type", "", "Node type: ENTITY, ASSET, DATA (required)")
|
||||
cmd.Flags().StringVar(&flagName, "name", "", "Node name (required)")
|
||||
|
||||
_ = cmd.MarkFlagRequired("scope-id")
|
||||
|
||||
Reference in New Issue
Block a user