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:
Sacha Al Himdani
2026-06-08 15:37:56 +02:00
parent b643c8eb6d
commit dbf915047d
44 changed files with 3620 additions and 79 deletions

View File

@@ -45,10 +45,6 @@ export const description: INodeProperties[] = [
name: 'Entity',
value: 'ENTITY',
},
{
name: 'Boundary',
value: 'BOUNDARY',
},
{
name: 'Asset',
value: 'ASSET',
@@ -76,6 +72,19 @@ export const description: INodeProperties[] = [
description: 'The name of the node',
required: true,
},
{
displayName: 'Boundary ID',
name: 'boundaryId',
type: 'string',
displayOptions: {
show: {
resource: ['riskAssessment'],
operation: ['createNode'],
},
},
default: '',
description: 'The ID of the boundary that contains this node (optional)',
},
];
export async function execute(
@@ -85,6 +94,7 @@ export async function execute(
const riskAssessmentScopeId = this.getNodeParameter('riskAssessmentScopeId', itemIndex) as string;
const nodeType = this.getNodeParameter('nodeType', itemIndex) as string;
const name = this.getNodeParameter('name', itemIndex) as string;
const boundaryId = this.getNodeParameter('boundaryId', itemIndex, '') as string;
const query = `
mutation CreateRiskAssessmentNode($input: CreateRiskAssessmentNodeInput!) {
@@ -93,6 +103,7 @@ export async function execute(
node {
id
riskAssessmentScopeId
boundaryId
nodeType
name
createdAt
@@ -103,9 +114,10 @@ export async function execute(
}
`;
const responseData = await proboApiRequest.call(this, query, {
input: { riskAssessmentScopeId, nodeType, name },
});
const input: Record<string, unknown> = { riskAssessmentScopeId, nodeType, name };
if (boundaryId) input.boundaryId = boundaryId;
const responseData = await proboApiRequest.call(this, query, { input });
return {
json: responseData,