diff --git a/packages/nodes-base/credentials/TheHiveApi.credentials.ts b/packages/nodes-base/credentials/TheHiveApi.credentials.ts index 19251ec588..0a3b415f56 100644 --- a/packages/nodes-base/credentials/TheHiveApi.credentials.ts +++ b/packages/nodes-base/credentials/TheHiveApi.credentials.ts @@ -41,5 +41,11 @@ export class TheHiveApi implements ICredentialType { }, ], }, + { + displayName: 'Ignore SSL Issues', + name: 'allowUnauthorizedCerts', + type: 'boolean' as NodePropertyTypes, + default: false, + }, ]; } diff --git a/packages/nodes-base/nodes/Cortex/Cortex.node.ts b/packages/nodes-base/nodes/Cortex/Cortex.node.ts index b759594146..eb20b23f2a 100644 --- a/packages/nodes-base/nodes/Cortex/Cortex.node.ts +++ b/packages/nodes-base/nodes/Cortex/Cortex.node.ts @@ -53,7 +53,7 @@ export class Cortex implements INodeType { description: INodeTypeDescription = { displayName: 'Cortex', name: 'cortex', - icon: 'file:cortex.png', + icon: 'file:cortex.svg', group: ['transform'], subtitle: '={{$parameter["resource"]+ ": " + $parameter["operation"]}}', version: 1, diff --git a/packages/nodes-base/nodes/Cortex/cortex.png b/packages/nodes-base/nodes/Cortex/cortex.png deleted file mode 100644 index e517928ed6..0000000000 Binary files a/packages/nodes-base/nodes/Cortex/cortex.png and /dev/null differ diff --git a/packages/nodes-base/nodes/Cortex/cortex.svg b/packages/nodes-base/nodes/Cortex/cortex.svg new file mode 100644 index 0000000000..a843f22ba7 --- /dev/null +++ b/packages/nodes-base/nodes/Cortex/cortex.svg @@ -0,0 +1 @@ +cortex-logo \ No newline at end of file diff --git a/packages/nodes-base/nodes/TheHive/GenericFunctions.ts b/packages/nodes-base/nodes/TheHive/GenericFunctions.ts index 3e3e9ae4a3..4a64dd36bb 100644 --- a/packages/nodes-base/nodes/TheHive/GenericFunctions.ts +++ b/packages/nodes-base/nodes/TheHive/GenericFunctions.ts @@ -29,6 +29,7 @@ export async function theHiveApiRequest(this: IHookFunctions | IExecuteFunctions qs: query, uri: uri || `${credentials.url}/api${resource}`, body, + rejectUnauthorized: credentials.allowUnauthorizedCerts as boolean, json: true, }; diff --git a/packages/nodes-base/nodes/TheHive/TheHive.node.ts b/packages/nodes-base/nodes/TheHive/TheHive.node.ts index 72155b8044..b41a50c40a 100644 --- a/packages/nodes-base/nodes/TheHive/TheHive.node.ts +++ b/packages/nodes-base/nodes/TheHive/TheHive.node.ts @@ -67,7 +67,7 @@ export class TheHive implements INodeType { description: INodeTypeDescription = { displayName: 'TheHive', name: 'theHive', - icon: 'file:thehive.png', + icon: 'file:thehive.svg', group: ['transform'], subtitle: '={{$parameter["operation"]}} : {{$parameter["resource"]}}', version: 1, @@ -216,6 +216,8 @@ export class TheHive implements INodeType { { name: 'Execute Responder', value: 'executeResponder', description: 'Execute a responder on the specified alert' }, { name: 'Get', value: 'get', description: 'Get an alert' }, { name: 'Get All', value: 'getAll', description: 'Get all alerts' }, + { name: 'Mark as Read', value: 'markAsRead', description: 'Mark the alert as read' }, + { name: 'Mark as Unread', value: 'markAsUnread', description: 'Mark the alert as unread' }, { name: 'Merge', value: 'merge', description: 'Merge alert into an existing case' }, { name: 'Promote', value: 'promote', description: 'Promote an alert into a case' }, { name: 'Update', value: 'update', description: 'Update alert' }, @@ -535,6 +537,26 @@ export class TheHive implements INodeType { ); } + if (operation === 'markAsRead') { + const alertId = this.getNodeParameter('id', i) as string; + + responseData = await theHiveApiRequest.call( + this, + 'POST', + `/alert/${alertId}/markAsRead`, + ); + } + + if (operation === 'markAsUnread') { + const alertId = this.getNodeParameter('id', i) as string; + + responseData = await theHiveApiRequest.call( + this, + 'POST', + `/alert/${alertId}/markAsUnread`, + ); + } + if (operation === 'merge') { const alertId = this.getNodeParameter('id', i) as string; diff --git a/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts b/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts index 7618bab4e2..fcd211d12e 100644 --- a/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts +++ b/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts @@ -14,7 +14,7 @@ export class TheHiveTrigger implements INodeType { description: INodeTypeDescription = { displayName: 'TheHive Trigger', name: 'theHiveTrigger', - icon: 'file:thehive.png', + icon: 'file:thehive.svg', group: ['trigger'], version: 1, description: 'Starts the workflow when a TheHive event occurs.', diff --git a/packages/nodes-base/nodes/TheHive/descriptions/AlertDescription.ts b/packages/nodes-base/nodes/TheHive/descriptions/AlertDescription.ts index 77ff3336c0..551c68ec02 100644 --- a/packages/nodes-base/nodes/TheHive/descriptions/AlertDescription.ts +++ b/packages/nodes-base/nodes/TheHive/descriptions/AlertDescription.ts @@ -82,6 +82,8 @@ export const alertFields = [ ], operation: [ 'promote', + 'markAsRead', + 'markAsUnread', 'merge', 'update', 'executeResponder', diff --git a/packages/nodes-base/nodes/TheHive/thehive.png b/packages/nodes-base/nodes/TheHive/thehive.png deleted file mode 100644 index a28fa90b56..0000000000 Binary files a/packages/nodes-base/nodes/TheHive/thehive.png and /dev/null differ diff --git a/packages/nodes-base/nodes/TheHive/thehive.svg b/packages/nodes-base/nodes/TheHive/thehive.svg new file mode 100644 index 0000000000..25ee988a32 --- /dev/null +++ b/packages/nodes-base/nodes/TheHive/thehive.svg @@ -0,0 +1 @@ +th-logo \ No newline at end of file