@cccsaurora/howler-ui 2.19.0-cases.1065 → 2.19.0-cases.1097
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/v2/search/index.d.ts +2 -1
- package/api/v2/search/index.js +2 -2
- package/components/app/providers/ParameterProvider.d.ts +1 -1
- package/components/app/providers/ParameterProvider.test.js +25 -25
- package/components/app/providers/RecordProvider.d.ts +6 -6
- package/components/app/providers/RecordProvider.js +5 -1
- package/components/app/providers/RecordSearchProvider.d.ts +2 -2
- package/components/elements/ObjectDetails.d.ts +2 -2
- package/components/elements/PluginTypography.d.ts +2 -2
- package/components/elements/event/EventCard.d.ts +6 -0
- package/components/elements/{observable/ObservableCard.js → event/EventCard.js} +7 -7
- package/components/elements/{observable/ObservablePreview.d.ts → event/EventPreview.d.ts} +2 -2
- package/components/elements/event/EventPreview.js +12 -0
- package/components/elements/hit/HitCard.d.ts +2 -0
- package/components/elements/hit/HitCard.js +2 -2
- package/components/elements/hit/HitSummary.d.ts +2 -2
- package/components/elements/hit/related/RelatedRecords.js +4 -4
- package/components/elements/record/RecordComments.d.ts +2 -2
- package/components/elements/record/RecordRelated.d.ts +2 -2
- package/components/elements/record/RecordRelated.js +4 -4
- package/components/elements/record/RecordWorklog.d.ts +2 -2
- package/components/hooks/useRelatedRecords.d.ts +3 -3
- package/components/hooks/useRelatedRecords.js +2 -2
- package/components/routes/cases/detail/AlertPanel.test.d.ts +1 -0
- package/components/routes/cases/detail/AlertPanel.test.js +110 -0
- package/components/routes/cases/detail/CaseAssets.d.ts +2 -2
- package/components/routes/cases/detail/CaseAssets.js +2 -2
- package/components/routes/cases/detail/CaseAssets.test.js +4 -4
- package/components/routes/cases/detail/CaseDashboard.js +2 -2
- package/components/routes/cases/detail/CaseDashboard.test.d.ts +1 -0
- package/components/routes/cases/detail/CaseDashboard.test.js +218 -0
- package/components/routes/cases/detail/CaseRules.test.js +2 -2
- package/components/routes/cases/detail/CaseTimeline.js +5 -5
- package/components/routes/cases/detail/CaseTimeline.test.js +7 -7
- package/components/routes/cases/detail/CreateRuleDialog.js +4 -4
- package/components/routes/cases/detail/CreateRuleDialog.test.js +5 -5
- package/components/routes/cases/detail/ItemPage.js +1 -1
- package/components/routes/cases/detail/aggregates/CaseAggregate.d.ts +2 -2
- package/components/routes/cases/detail/assets/Asset.d.ts +1 -1
- package/components/routes/cases/detail/assets/Asset.test.js +2 -2
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.d.ts +1 -1
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.js +3 -3
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.test.js +8 -8
- package/components/routes/cases/detail/sidebar/FolderEntry.js +1 -1
- package/components/routes/cases/modals/AddToCaseModal.d.ts +2 -2
- package/components/routes/cases/modals/AddToCaseModal.test.js +11 -11
- package/components/routes/cases/modals/CaseRecordRow.js +1 -1
- package/components/routes/cases/modals/CreateCaseModal.d.ts +2 -2
- package/components/routes/cases/modals/CreateCaseModal.test.js +14 -14
- package/components/routes/cases/modals/hooks.d.ts +3 -3
- package/components/routes/cases/modals/hooks.js +1 -1
- package/components/routes/cases/modals/types.d.ts +4 -1
- package/components/routes/events/EventViewer.d.ts +7 -0
- package/components/routes/events/EventViewer.js +27 -0
- package/components/routes/hits/search/SearchPane.js +3 -3
- package/components/routes/hits/search/grid/EnhancedCell.d.ts +2 -2
- package/components/routes/hits/search/grid/RecordRow.d.ts +3 -3
- package/components/routes/hits/search/grid/RecordRow.js +2 -2
- package/components/routes/hits/search/shared/IndexPicker.js +1 -1
- package/components/routes/home/ViewCard.js +4 -4
- package/components/routes/views/ViewComposer.js +2 -2
- package/locales/en/translation.json +4 -4
- package/locales/fr/translation.json +4 -4
- package/models/entities/generated/ECSEvent.d.ts +31 -0
- package/models/entities/generated/Event.d.ts +80 -26
- package/models/entities/generated/{ObservableCloud.d.ts → EventCloud.d.ts} +1 -1
- package/models/entities/generated/{ObservableDestination.d.ts → EventDestination.d.ts} +1 -1
- package/models/entities/generated/{ObservableEmail.d.ts → EventEmail.d.ts} +1 -1
- package/models/entities/generated/{ObservableFile.d.ts → EventFile.d.ts} +1 -1
- package/models/entities/generated/{ObservableHowler.d.ts → EventHowler.d.ts} +1 -1
- package/models/entities/generated/{ObservableHttp.d.ts → EventHttp.d.ts} +1 -1
- package/models/entities/generated/{ObservableObserver.d.ts → EventObserver.d.ts} +1 -1
- package/models/entities/generated/{ObservableOrganization.d.ts → EventOrganization.d.ts} +1 -1
- package/models/entities/generated/{ObservableProcess.d.ts → EventProcess.d.ts} +1 -1
- package/models/entities/generated/{ObservableSource.d.ts → EventSource.d.ts} +1 -1
- package/models/entities/generated/{ObservableThreat.d.ts → EventThreat.d.ts} +1 -1
- package/models/entities/generated/{ObservableTls.d.ts → EventTls.d.ts} +1 -1
- package/models/entities/generated/Hit.d.ts +2 -2
- package/models/entities/generated/Rule.d.ts +1 -1
- package/package.json +3 -3
- package/plugins/clue/utils.d.ts +2 -2
- package/tests/server-handlers.js +1 -1
- package/tests/utils.d.ts +2 -2
- package/tests/utils.js +3 -3
- package/utils/hitFunctions.d.ts +2 -2
- package/utils/typeUtils.d.ts +2 -2
- package/utils/typeUtils.js +2 -2
- package/components/elements/observable/ObservableCard.d.ts +0 -6
- package/components/elements/observable/ObservablePreview.js +0 -12
- package/components/routes/observables/ObservableViewer.d.ts +0 -7
- package/components/routes/observables/ObservableViewer.js +0 -27
- package/models/entities/generated/Observable.d.ts +0 -85
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
3
|
+
*/
|
|
4
|
+
export interface ECSEvent {
|
|
5
|
+
action?: string;
|
|
6
|
+
category?: string[];
|
|
7
|
+
code?: string;
|
|
8
|
+
count?: number;
|
|
9
|
+
created?: string;
|
|
10
|
+
dataset?: string;
|
|
11
|
+
duration?: number;
|
|
12
|
+
end?: string;
|
|
13
|
+
hash?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
ingested?: string;
|
|
16
|
+
kind?: string;
|
|
17
|
+
module?: string;
|
|
18
|
+
original?: string;
|
|
19
|
+
outcome?: string;
|
|
20
|
+
provider?: string;
|
|
21
|
+
reason?: string;
|
|
22
|
+
reference?: string;
|
|
23
|
+
risk_score?: number;
|
|
24
|
+
risk_score_norm?: number;
|
|
25
|
+
sequence?: number;
|
|
26
|
+
severity?: number;
|
|
27
|
+
start?: string;
|
|
28
|
+
timezone?: string;
|
|
29
|
+
type?: string[];
|
|
30
|
+
url?: string;
|
|
31
|
+
}
|
|
@@ -1,31 +1,85 @@
|
|
|
1
|
+
import type { Agent } from './Agent';
|
|
2
|
+
import type { Assemblyline } from './Assemblyline';
|
|
3
|
+
import type { Aws } from './Aws';
|
|
4
|
+
import type { Azure } from './Azure';
|
|
5
|
+
import type { Cbs } from './Cbs';
|
|
6
|
+
import type { Clue } from './Clue';
|
|
7
|
+
import type { Container } from './Container';
|
|
8
|
+
import type { Dns } from './Dns';
|
|
9
|
+
import type { Ecs } from './Ecs';
|
|
10
|
+
import type { ECSEvent } from './ECSEvent';
|
|
11
|
+
import type { Error } from './Error';
|
|
12
|
+
import type { EventCloud } from './EventCloud';
|
|
13
|
+
import type { EventDestination } from './EventDestination';
|
|
14
|
+
import type { EventEmail } from './EventEmail';
|
|
15
|
+
import type { EventFile } from './EventFile';
|
|
16
|
+
import type { EventHowler } from './EventHowler';
|
|
17
|
+
import type { EventHttp } from './EventHttp';
|
|
18
|
+
import type { EventObserver } from './EventObserver';
|
|
19
|
+
import type { EventOrganization } from './EventOrganization';
|
|
20
|
+
import type { EventProcess } from './EventProcess';
|
|
21
|
+
import type { EventSource } from './EventSource';
|
|
22
|
+
import type { EventThreat } from './EventThreat';
|
|
23
|
+
import type { EventTls } from './EventTls';
|
|
24
|
+
import type { Faas } from './Faas';
|
|
25
|
+
import type { Gcp } from './Gcp';
|
|
26
|
+
import type { Group } from './Group';
|
|
27
|
+
import type { Host } from './Host';
|
|
28
|
+
import type { Interface } from './Interface';
|
|
29
|
+
import type { Network } from './Network';
|
|
30
|
+
import type { Registry } from './Registry';
|
|
31
|
+
import type { Related } from './Related';
|
|
32
|
+
import type { Rule } from './Rule';
|
|
33
|
+
import type { Server } from './Server';
|
|
34
|
+
import type { Url } from './Url';
|
|
35
|
+
import type { User } from './User';
|
|
36
|
+
import type { UserAgent } from './UserAgent';
|
|
37
|
+
import type { Vulnerability } from './Vulnerability';
|
|
38
|
+
|
|
1
39
|
/**
|
|
2
40
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
3
41
|
*/
|
|
4
42
|
export interface Event {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
43
|
+
__index: 'event';
|
|
44
|
+
agent?: Agent;
|
|
45
|
+
assemblyline?: Assemblyline;
|
|
46
|
+
aws?: Aws;
|
|
47
|
+
azure?: Azure;
|
|
48
|
+
cbs?: Cbs;
|
|
49
|
+
cloud?: EventCloud;
|
|
50
|
+
clue?: Clue;
|
|
51
|
+
container?: Container;
|
|
52
|
+
destination?: EventDestination;
|
|
53
|
+
dns?: Dns;
|
|
54
|
+
ecs?: Ecs;
|
|
55
|
+
email?: EventEmail;
|
|
56
|
+
error?: Error;
|
|
57
|
+
event?: ECSEvent;
|
|
58
|
+
faas?: Faas;
|
|
59
|
+
file?: EventFile;
|
|
60
|
+
gcp?: Gcp;
|
|
61
|
+
group?: Group;
|
|
62
|
+
host?: Host;
|
|
63
|
+
howler: EventHowler;
|
|
64
|
+
http?: EventHttp;
|
|
65
|
+
interface?: Interface;
|
|
66
|
+
labels?: { [index: string]: string };
|
|
67
|
+
message?: string;
|
|
68
|
+
network?: Network;
|
|
69
|
+
observer?: EventObserver;
|
|
70
|
+
organization?: EventOrganization;
|
|
71
|
+
process?: EventProcess;
|
|
72
|
+
registry?: Registry;
|
|
73
|
+
related?: Related;
|
|
74
|
+
rule?: Rule;
|
|
75
|
+
server?: Server;
|
|
76
|
+
source?: EventSource;
|
|
77
|
+
tags?: string[];
|
|
78
|
+
threat?: EventThreat;
|
|
79
|
+
timestamp: string;
|
|
80
|
+
tls?: EventTls;
|
|
81
|
+
url?: Url;
|
|
82
|
+
user?: User;
|
|
83
|
+
user_agent?: UserAgent;
|
|
84
|
+
vulnerability?: Vulnerability;
|
|
31
85
|
}
|
|
@@ -7,7 +7,7 @@ import type { Service } from './Service';
|
|
|
7
7
|
/**
|
|
8
8
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface EventCloud {
|
|
11
11
|
account?: CloudAccount;
|
|
12
12
|
availability_zone?: string;
|
|
13
13
|
instance?: Instance;
|
|
@@ -7,7 +7,7 @@ import type { User } from './User';
|
|
|
7
7
|
/**
|
|
8
8
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface EventDestination {
|
|
11
11
|
address?: string;
|
|
12
12
|
autonomous_systems?: AutonomousSystems;
|
|
13
13
|
bytes?: number;
|
|
@@ -10,7 +10,7 @@ import type { Votes } from './Votes';
|
|
|
10
10
|
/**
|
|
11
11
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
12
12
|
*/
|
|
13
|
-
export interface
|
|
13
|
+
export interface EventHowler {
|
|
14
14
|
analytic: string;
|
|
15
15
|
assessment?: string;
|
|
16
16
|
comment?: HowlerComment[];
|
|
@@ -5,7 +5,7 @@ import type { ObserverIngress } from './ObserverIngress';
|
|
|
5
5
|
/**
|
|
6
6
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
7
7
|
*/
|
|
8
|
-
export interface
|
|
8
|
+
export interface EventObserver {
|
|
9
9
|
egress?: Egress;
|
|
10
10
|
hostname?: string;
|
|
11
11
|
ingress?: ObserverIngress;
|
|
@@ -8,7 +8,7 @@ import type { ProcessUser } from './ProcessUser';
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
10
10
|
*/
|
|
11
|
-
export interface
|
|
11
|
+
export interface EventProcess {
|
|
12
12
|
args?: string[];
|
|
13
13
|
args_count?: number;
|
|
14
14
|
code_signature?: CodeSignature;
|
|
@@ -7,7 +7,7 @@ import type { User } from './User';
|
|
|
7
7
|
/**
|
|
8
8
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface EventSource {
|
|
11
11
|
address?: string;
|
|
12
12
|
autonomous_systems?: AutonomousSystems;
|
|
13
13
|
bytes?: number;
|
|
@@ -9,7 +9,7 @@ import type { ThreatTechnique } from './ThreatTechnique';
|
|
|
9
9
|
/**
|
|
10
10
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
11
11
|
*/
|
|
12
|
-
export interface
|
|
12
|
+
export interface EventThreat {
|
|
13
13
|
enrichments?: ThreatEnrichment[];
|
|
14
14
|
feed?: Feed;
|
|
15
15
|
framework?: string;
|
|
@@ -9,9 +9,9 @@ import type { Container } from './Container';
|
|
|
9
9
|
import type { Destination } from './Destination';
|
|
10
10
|
import type { Dns } from './Dns';
|
|
11
11
|
import type { Ecs } from './Ecs';
|
|
12
|
+
import type { ECSEvent } from './ECSEvent';
|
|
12
13
|
import type { Email } from './Email';
|
|
13
14
|
import type { Error } from './Error';
|
|
14
|
-
import type { Event } from './Event';
|
|
15
15
|
import type { Faas } from './Faas';
|
|
16
16
|
import type { Gcp } from './Gcp';
|
|
17
17
|
import type { Group } from './Group';
|
|
@@ -55,7 +55,7 @@ export interface Hit {
|
|
|
55
55
|
ecs?: Ecs;
|
|
56
56
|
email?: Email;
|
|
57
57
|
error?: Error;
|
|
58
|
-
event?:
|
|
58
|
+
event?: ECSEvent;
|
|
59
59
|
faas?: Faas;
|
|
60
60
|
file?: HitFile;
|
|
61
61
|
gcp?: Gcp;
|
package/package.json
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"internal-slot": "1.0.7"
|
|
97
97
|
},
|
|
98
98
|
"type": "module",
|
|
99
|
-
"version": "2.19.0-cases.
|
|
99
|
+
"version": "2.19.0-cases.1097",
|
|
100
100
|
"exports": {
|
|
101
101
|
"./i18n": "./i18n.js",
|
|
102
102
|
"./index.css": "./index.css",
|
|
@@ -183,11 +183,11 @@
|
|
|
183
183
|
"./components/routes/action/*": "./components/routes/action/*.js",
|
|
184
184
|
"./components/routes/advanced/*": "./components/routes/advanced/*.js",
|
|
185
185
|
"./components/routes/analytics/*": "./components/routes/analytics/*.js",
|
|
186
|
-
"./components/routes/observables/*": "./components/routes/observables/*.js",
|
|
187
186
|
"./components/routes/admin/*": "./components/routes/admin/*.js",
|
|
188
187
|
"./components/routes/overviews/*": "./components/routes/overviews/*.js",
|
|
189
188
|
"./components/routes/templates/*": "./components/routes/templates/*.js",
|
|
190
189
|
"./components/routes/views/*": "./components/routes/views/*.js",
|
|
190
|
+
"./components/routes/events/*": "./components/routes/events/*.js",
|
|
191
191
|
"./components/routes/dossiers/*": "./components/routes/dossiers/*.js",
|
|
192
192
|
"./components/routes/hits/*": "./components/routes/hits/*.js",
|
|
193
193
|
"./components/routes/cases/*": "./components/routes/cases/*.js",
|
|
@@ -217,12 +217,12 @@
|
|
|
217
217
|
"./components/app/drawers/*": "./components/app/drawers/*.js",
|
|
218
218
|
"./components/app/hooks/*": "./components/app/hooks/*.js",
|
|
219
219
|
"./components/elements/view/*": "./components/elements/view/*.js",
|
|
220
|
+
"./components/elements/event/*": "./components/elements/event/*.js",
|
|
220
221
|
"./components/elements/case/*": "./components/elements/case/*.js",
|
|
221
222
|
"./components/elements/record/*": "./components/elements/record/*.js",
|
|
222
223
|
"./components/elements/display/*": "./components/elements/display/*.js",
|
|
223
224
|
"./components/elements/hit/*": "./components/elements/hit/*.js",
|
|
224
225
|
"./components/elements/addons/*": "./components/elements/addons/*.js",
|
|
225
|
-
"./components/elements/observable/*": "./components/elements/observable/*.js",
|
|
226
226
|
"./components/elements/display/markdownPlugins/*.md": "./components/elements/display/markdownPlugins/*.md.js",
|
|
227
227
|
"./components/elements/display/features/*": "./components/elements/display/features/*.js",
|
|
228
228
|
"./components/elements/display/icons/*": "./components/elements/display/icons/*.js",
|
package/plugins/clue/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
import type { Event } from '@cccsaurora/howler-ui/models/entities/generated/Event';
|
|
1
2
|
import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
|
|
2
|
-
|
|
3
|
-
export declare const useType: (hit?: Hit | Observable, field?: string, value?: string) => any;
|
|
3
|
+
export declare const useType: (hit?: Hit | Event, field?: string, value?: string) => any;
|
package/tests/server-handlers.js
CHANGED
package/tests/utils.d.ts
CHANGED
|
@@ -2,15 +2,15 @@ import type { Action } from '@cccsaurora/howler-ui/models/entities/generated/Act
|
|
|
2
2
|
import type { Analytic } from '@cccsaurora/howler-ui/models/entities/generated/Analytic';
|
|
3
3
|
import type { Case } from '@cccsaurora/howler-ui/models/entities/generated/Case';
|
|
4
4
|
import type { Dossier } from '@cccsaurora/howler-ui/models/entities/generated/Dossier';
|
|
5
|
+
import type { Event } from '@cccsaurora/howler-ui/models/entities/generated/Event';
|
|
5
6
|
import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
|
|
6
|
-
import type { Observable } from '@cccsaurora/howler-ui/models/entities/generated/Observable';
|
|
7
7
|
import type { Template } from '@cccsaurora/howler-ui/models/entities/generated/Template';
|
|
8
8
|
import type { View } from '@cccsaurora/howler-ui/models/entities/generated/View';
|
|
9
9
|
type RecursivePartial<T> = {
|
|
10
10
|
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];
|
|
11
11
|
};
|
|
12
12
|
export declare const createMockHit: (overrides?: RecursivePartial<Hit>) => Hit;
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const createMockEvent: (overrides?: RecursivePartial<Event>) => Event;
|
|
14
14
|
export declare const createMockAnalytic: (overrides?: Partial<Analytic>) => Analytic;
|
|
15
15
|
export declare const createMockTemplate: (overrides?: Partial<Template>) => Template;
|
|
16
16
|
export declare const createMockAction: (overrides?: Partial<Action>) => Action;
|
package/tests/utils.js
CHANGED
|
@@ -16,11 +16,11 @@ export const createMockHit = (overrides) => ({
|
|
|
16
16
|
...overrides?.event
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
export const
|
|
19
|
+
export const createMockEvent = (overrides) => ({
|
|
20
20
|
...overrides,
|
|
21
|
-
__index: '
|
|
21
|
+
__index: 'event',
|
|
22
22
|
howler: {
|
|
23
|
-
id: 'test-
|
|
23
|
+
id: 'test-event-1',
|
|
24
24
|
analytic: 'test-analytic',
|
|
25
25
|
detection: 'Test Detection',
|
|
26
26
|
hash: '',
|
package/utils/hitFunctions.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
import type { Event } from '@cccsaurora/howler-ui/models/entities/generated/Event';
|
|
1
2
|
import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
|
|
2
|
-
|
|
3
|
-
export declare const getUserList: (record: Hit | Observable) => Set<string>;
|
|
3
|
+
export declare const getUserList: (record: Hit | Event) => Set<string>;
|
package/utils/typeUtils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Case } from '@cccsaurora/howler-ui/models/entities/generated/Case';
|
|
2
|
+
import type { Event } from '@cccsaurora/howler-ui/models/entities/generated/Event';
|
|
2
3
|
import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
|
|
3
|
-
import type { Observable } from '@cccsaurora/howler-ui/models/entities/generated/Observable';
|
|
4
4
|
import type { WithMetadata } from '@cccsaurora/howler-ui/models/WithMetadata';
|
|
5
5
|
export declare const isHit: (obj: WithMetadata<any>) => obj is Hit;
|
|
6
6
|
export declare const isCase: (obj: WithMetadata<any>) => obj is Case;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const isEvent: (obj: WithMetadata<any>) => obj is Event;
|
package/utils/typeUtils.js
CHANGED
|
@@ -16,11 +16,11 @@ export const isCase = (obj) => {
|
|
|
16
16
|
}
|
|
17
17
|
return false;
|
|
18
18
|
};
|
|
19
|
-
export const
|
|
19
|
+
export const isEvent = (obj) => {
|
|
20
20
|
if (!obj) {
|
|
21
21
|
return false;
|
|
22
22
|
}
|
|
23
|
-
if (obj.__index === '
|
|
23
|
+
if (obj.__index === 'event') {
|
|
24
24
|
return true;
|
|
25
25
|
}
|
|
26
26
|
return false;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { OpenInNew } from '@mui/icons-material';
|
|
3
|
-
import { Chip, IconButton, Stack, Typography, useTheme } from '@mui/material';
|
|
4
|
-
import { memo } from 'react';
|
|
5
|
-
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { Link } from 'react-router-dom';
|
|
7
|
-
const ObservablePreview = ({ observable }) => {
|
|
8
|
-
const { t } = useTranslation();
|
|
9
|
-
const theme = useTheme();
|
|
10
|
-
return (_jsx(Stack, { flex: 1, spacing: 1, sx: { overflow: 'hidden', borderBottom: `thin solid ${theme.palette.divider}`, pb: 1, mb: 0 }, children: _jsxs(Stack, { children: [_jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(Typography, { variant: "body1", fontWeight: "bold", children: observable.event.provider }), _jsx("div", { style: { flex: 1 } }), _jsx(Chip, { label: observable.event.kind }), observable.event.reference && (_jsx(IconButton, { size: "small", component: Link, to: observable.event.reference, sx: { opacity: 1 }, target: "_blank", rel: "noopener noreferrer", children: _jsx(OpenInNew, { fontSize: "small" }) }))] }), observable.event.type && (_jsxs(Typography, { variant: "caption", children: [t('event.type'), " - ", observable.event.type.join(', ')] })), observable.event.module && (_jsxs(Typography, { variant: "caption", children: [t('event.module'), " - ", observable.event.module] }))] }) }));
|
|
11
|
-
};
|
|
12
|
-
export default memo(ObservablePreview);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Skeleton } from '@mui/material';
|
|
3
|
-
import api from '@cccsaurora/howler-ui/api';
|
|
4
|
-
import ObjectDetails from '@cccsaurora/howler-ui/components/elements/ObjectDetails';
|
|
5
|
-
import useMyApi from '@cccsaurora/howler-ui/components/hooks/useMyApi';
|
|
6
|
-
import { useEffect, useState } from 'react';
|
|
7
|
-
const ObservableViewer = ({ observable: provided, observableId }) => {
|
|
8
|
-
const { dispatchApi } = useMyApi();
|
|
9
|
-
const [observable, setObservable] = useState(null);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
if (provided) {
|
|
12
|
-
setObservable(provided);
|
|
13
|
-
}
|
|
14
|
-
}, [provided]);
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
if (observableId) {
|
|
17
|
-
dispatchApi(api.v2.search.post('observable', { query: `howler.id:${observableId}`, rows: 1 }), {
|
|
18
|
-
throwError: false
|
|
19
|
-
}).then(res => setObservable(res.items[0]));
|
|
20
|
-
}
|
|
21
|
-
}, [dispatchApi, observableId]);
|
|
22
|
-
if (!observable) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
return _jsx(Box, { p: 1, children: observable ? _jsx(ObjectDetails, { obj: observable }) : _jsx(Skeleton, { height: 120 }) });
|
|
26
|
-
};
|
|
27
|
-
export default ObservableViewer;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { Agent } from './Agent';
|
|
2
|
-
import type { Assemblyline } from './Assemblyline';
|
|
3
|
-
import type { Aws } from './Aws';
|
|
4
|
-
import type { Azure } from './Azure';
|
|
5
|
-
import type { Cbs } from './Cbs';
|
|
6
|
-
import type { Clue } from './Clue';
|
|
7
|
-
import type { Container } from './Container';
|
|
8
|
-
import type { Dns } from './Dns';
|
|
9
|
-
import type { Ecs } from './Ecs';
|
|
10
|
-
import type { Error } from './Error';
|
|
11
|
-
import type { Event } from './Event';
|
|
12
|
-
import type { Faas } from './Faas';
|
|
13
|
-
import type { Gcp } from './Gcp';
|
|
14
|
-
import type { Group } from './Group';
|
|
15
|
-
import type { Host } from './Host';
|
|
16
|
-
import type { Interface } from './Interface';
|
|
17
|
-
import type { Network } from './Network';
|
|
18
|
-
import type { ObservableCloud } from './ObservableCloud';
|
|
19
|
-
import type { ObservableDestination } from './ObservableDestination';
|
|
20
|
-
import type { ObservableEmail } from './ObservableEmail';
|
|
21
|
-
import type { ObservableFile } from './ObservableFile';
|
|
22
|
-
import type { ObservableHowler } from './ObservableHowler';
|
|
23
|
-
import type { ObservableHttp } from './ObservableHttp';
|
|
24
|
-
import type { ObservableObserver } from './ObservableObserver';
|
|
25
|
-
import type { ObservableOrganization } from './ObservableOrganization';
|
|
26
|
-
import type { ObservableProcess } from './ObservableProcess';
|
|
27
|
-
import type { ObservableSource } from './ObservableSource';
|
|
28
|
-
import type { ObservableThreat } from './ObservableThreat';
|
|
29
|
-
import type { ObservableTls } from './ObservableTls';
|
|
30
|
-
import type { Registry } from './Registry';
|
|
31
|
-
import type { Related } from './Related';
|
|
32
|
-
import type { Rule } from './Rule';
|
|
33
|
-
import type { Server } from './Server';
|
|
34
|
-
import type { Url } from './Url';
|
|
35
|
-
import type { User } from './User';
|
|
36
|
-
import type { UserAgent } from './UserAgent';
|
|
37
|
-
import type { Vulnerability } from './Vulnerability';
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
41
|
-
*/
|
|
42
|
-
export interface Observable {
|
|
43
|
-
__index: 'observable';
|
|
44
|
-
agent?: Agent;
|
|
45
|
-
assemblyline?: Assemblyline;
|
|
46
|
-
aws?: Aws;
|
|
47
|
-
azure?: Azure;
|
|
48
|
-
cbs?: Cbs;
|
|
49
|
-
cloud?: ObservableCloud;
|
|
50
|
-
clue?: Clue;
|
|
51
|
-
container?: Container;
|
|
52
|
-
destination?: ObservableDestination;
|
|
53
|
-
dns?: Dns;
|
|
54
|
-
ecs?: Ecs;
|
|
55
|
-
email?: ObservableEmail;
|
|
56
|
-
error?: Error;
|
|
57
|
-
event?: Event;
|
|
58
|
-
faas?: Faas;
|
|
59
|
-
file?: ObservableFile;
|
|
60
|
-
gcp?: Gcp;
|
|
61
|
-
group?: Group;
|
|
62
|
-
host?: Host;
|
|
63
|
-
howler: ObservableHowler;
|
|
64
|
-
http?: ObservableHttp;
|
|
65
|
-
interface?: Interface;
|
|
66
|
-
labels?: { [index: string]: string };
|
|
67
|
-
message?: string;
|
|
68
|
-
network?: Network;
|
|
69
|
-
observer?: ObservableObserver;
|
|
70
|
-
organization?: ObservableOrganization;
|
|
71
|
-
process?: ObservableProcess;
|
|
72
|
-
registry?: Registry;
|
|
73
|
-
related?: Related;
|
|
74
|
-
rule?: Rule;
|
|
75
|
-
server?: Server;
|
|
76
|
-
source?: ObservableSource;
|
|
77
|
-
tags?: string[];
|
|
78
|
-
threat?: ObservableThreat;
|
|
79
|
-
timestamp: string;
|
|
80
|
-
tls?: ObservableTls;
|
|
81
|
-
url?: Url;
|
|
82
|
-
user?: User;
|
|
83
|
-
user_agent?: UserAgent;
|
|
84
|
-
vulnerability?: Vulnerability;
|
|
85
|
-
}
|