Add risk assessment system to CLI, MCP, and N8N

Expose the full risk assessment hierarchy (assessments, scopes, nodes,
processes, threats, scenarios) with CRUD operations and scenario
linking across all three interfaces.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-05-20 16:24:55 +02:00
parent 797e3da52f
commit 883031830f
86 changed files with 10720 additions and 11 deletions

View File

@@ -0,0 +1,57 @@
// Copyright (c) 2026 Probo Inc <hello@getprobo.com>.
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
import { proboApiRequest } from '../../GenericFunctions';
export const description: INodeProperties[] = [
{
displayName: 'Process ID',
name: 'processId',
type: 'string',
displayOptions: {
show: {
resource: ['riskAssessment'],
operation: ['deleteProcess'],
},
},
default: '',
description: 'The ID of the process to delete',
required: true,
},
];
export async function execute(
this: IExecuteFunctions,
itemIndex: number,
): Promise<INodeExecutionData> {
const processId = this.getNodeParameter('processId', itemIndex) as string;
const query = `
mutation DeleteRiskAssessmentProcess($input: DeleteRiskAssessmentProcessInput!) {
deleteRiskAssessmentProcess(input: $input) {
deletedRiskAssessmentProcessId
}
}
`;
const responseData = await proboApiRequest.call(this, query, {
input: { riskAssessmentProcessId: processId },
});
return {
json: responseData,
pairedItem: { item: itemIndex },
};
}