Add TheHive & Cortex nodes (#952)

*  TheHive & Cortex nodes

* 🔨 Make changes mentioned in #887

*  Improvements

*  Improvements

*  Improvements

*  Add descriptions

*  Improvements

*  Improvements

Co-authored-by: MedAliMarz <servfrdali@yahoo.fr>
This commit is contained in:
Ricardo Espinoza
2020-12-02 05:24:25 -05:00
committed by GitHub
parent ea79e80c17
commit ea9f61089b
25 changed files with 7549 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
import {
IDataObject
}from 'n8n-workflow'
export enum AlertStatus{
NEW="New",
UPDATED="Updated",
IGNORED="Ignored",
IMPORTED="Imported",
}
export enum TLP{
white,
green,
amber,
red
}
export interface IAlert{
// Required attributes
id?:string;
title?:string;
description?:string;
severity?:number;
date?:Date;
tags?:string[];
tlp?:TLP;
status?:AlertStatus;
type?:string;
source?:string;
sourceRef?:string;
artifacts?:IDataObject[];
follow?:boolean;
// Optional attributes
caseTemplate?:string;
// Backend generated attributes
lastSyncDate?:Date;
case?:string;
createdBy?:string;
createdAt?:Date;
updatedBy?:string;
upadtedAt?:Date;
}

View File

@@ -0,0 +1,53 @@
import { IDataObject } from "n8n-workflow";
import { TLP } from './AlertInterface';
export interface ICase{
// Required attributes
id?:string;
title?:string;
description?:string;
severity?:number;
startDate?:Date;
owner?:string;
flag?:boolean;
tlp?:TLP;
tags?:string[];
// Optional attributes
resolutionStatus?:CaseResolutionStatus;
impactStatus?:CaseImpactStatus;
summary?:string;
endDate?:Date;
metrics?:IDataObject;
// Backend generated attributes
status?:CaseStatus;
caseId?:number; // auto-generated attribute
mergeInto?:string;
mergeFrom?:string[];
createdBy?:string;
createdAt?:Date;
updatedBy?:string;
upadtedAt?:Date;
}
export enum CaseStatus{
OPEN="Open",
RESOLVED="Resolved",
DELETED="Deleted",
}
export enum CaseResolutionStatus{
INDETERMINATE="Indeterminate",
FALSEPOSITIVE="FalsePositive",
TRUEPOSITIVE="TruePositive",
OTHER="Other",
DUPLICATED="Duplicated",
}
export enum CaseImpactStatus{
NOIMPACT="NoImpact",
WITHIMPACT="WithImpact",
NOTAPPLICABLE="NotApplicable",
}

View File

@@ -0,0 +1,23 @@
import { IDataObject } from "n8n-workflow";
import {IAttachment} from "./ObservableInterface";
export enum LogStatus{
OK="Ok",
DELETED="Deleted"
}
export interface ILog{
// Required attributes
id?:string;
message?:string;
startDate?:Date;
status?:LogStatus;
// Optional attributes
attachment?:IAttachment;
// Backend generated attributes
createdBy?:string;
createdAt?:Date;
updatedBy?:string;
upadtedAt?:Date;
}

View File

@@ -0,0 +1,54 @@
import {
TLP
}from './AlertInterface'
import { IDataObject } from 'n8n-workflow';
export enum ObservableStatus{
OK="Ok",
DELETED="Deleted",
}
export enum ObservableDataType{
"domain"= "domain",
"file"= "file",
"filename"= "filename",
"fqdn"= "fqdn",
"hash"= "hash",
"ip"= "ip",
"mail"= "mail",
"mail_subject"= "mail_subject",
"other"= "other",
"regexp"= "regexp",
"registry"= "registry",
"uri_path"= "uri_path",
"url"= "url",
"user-agent"= "user-agent"
}
export interface IAttachment{
name?:string;
size?:number;
id?:string;
contentType?:string;
hashes:string[];
}
export interface IObservable{
// Required attributes
id?:string;
data?:string;
attachment?:IAttachment;
dataType?:ObservableDataType;
message?:string;
startDate?:Date;
tlp?:TLP;
ioc?:boolean;
status?:ObservableStatus;
// Optional attributes
tags:string[];
// Backend generated attributes
createdBy?:string;
createdAt?:Date;
updatedBy?:string;
upadtedAt?:Date;
}

View File

@@ -0,0 +1,25 @@
export interface ITask{
// Required attributes
id?:string;
title?:string;
status?:TaskStatus;
flag?:boolean;
// Optional attributes
owner?:string;
description?:string;
startDate?:Date;
endDate?:Date;
// Backend generated attributes
createdBy?:string;
createdAt?:Date;
updatedBy?:string;
upadtedAt?:Date;
}
export enum TaskStatus{
WAITING="Waiting",
INPROGRESS="InProgress",
COMPLETED="Completed",
CANCEL="Cancel",
}