@cccsaurora/howler-ui 2.19.0-cases.1064 → 2.19.0-cases.1095
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/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/CaseRules.test.js +2 -2
- package/components/routes/cases/detail/CaseSidebar.js +3 -3
- 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
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
|
-
}
|