mmisp-lib 0.1.0__py3-none-any.whl
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.
- mmisp/api_schemas/__init__.py +0 -0
- mmisp/api_schemas/attributes/__init__.py +0 -0
- mmisp/api_schemas/attributes/add_attribute_body.py +34 -0
- mmisp/api_schemas/attributes/add_attribute_response.py +33 -0
- mmisp/api_schemas/attributes/add_remove_tag_attribute_response.py +13 -0
- mmisp/api_schemas/attributes/delete_attribute_response.py +8 -0
- mmisp/api_schemas/attributes/delete_selected_attribute_body.py +9 -0
- mmisp/api_schemas/attributes/delete_selected_attribute_response.py +13 -0
- mmisp/api_schemas/attributes/edit_attribute_body.py +24 -0
- mmisp/api_schemas/attributes/edit_attributes_response.py +42 -0
- mmisp/api_schemas/attributes/get_all_attributes_response.py +38 -0
- mmisp/api_schemas/attributes/get_attribute_response.py +41 -0
- mmisp/api_schemas/attributes/get_attribute_statistics_response.py +137 -0
- mmisp/api_schemas/attributes/get_describe_types_response.py +29 -0
- mmisp/api_schemas/attributes/restore_attribute_reponse.py +25 -0
- mmisp/api_schemas/attributes/search_attributes_body.py +74 -0
- mmisp/api_schemas/attributes/search_attributes_response.py +52 -0
- mmisp/api_schemas/auth_keys/__init__.py +0 -0
- mmisp/api_schemas/auth_keys/add_auth_key_body.py +10 -0
- mmisp/api_schemas/auth_keys/add_auth_key_response.py +20 -0
- mmisp/api_schemas/auth_keys/edit_auth_key_body.py +8 -0
- mmisp/api_schemas/auth_keys/edit_auth_key_response.py +24 -0
- mmisp/api_schemas/auth_keys/search_auth_keys_body.py +17 -0
- mmisp/api_schemas/auth_keys/search_get_all_auth_keys_users_response.py +28 -0
- mmisp/api_schemas/auth_keys/view_auth_key_response.py +24 -0
- mmisp/api_schemas/authentication/__init__.py +0 -0
- mmisp/api_schemas/authentication/exchange_token_login_body.py +5 -0
- mmisp/api_schemas/authentication/password_login_body.py +6 -0
- mmisp/api_schemas/authentication/start_login_body.py +5 -0
- mmisp/api_schemas/authentication/start_login_response.py +21 -0
- mmisp/api_schemas/authentication/token_response.py +5 -0
- mmisp/api_schemas/events/FreeTextImportWorkerBody.py +17 -0
- mmisp/api_schemas/events/__init__.py +0 -0
- mmisp/api_schemas/events/add_attribute_via_free_text_import_event_body.py +12 -0
- mmisp/api_schemas/events/add_attribute_via_free_text_import_event_response.py +14 -0
- mmisp/api_schemas/events/add_edit_get_event_response.py +234 -0
- mmisp/api_schemas/events/add_event_body.py +30 -0
- mmisp/api_schemas/events/add_remove_tag_events_response.py +11 -0
- mmisp/api_schemas/events/delete_event_response.py +14 -0
- mmisp/api_schemas/events/edit_event_body.py +28 -0
- mmisp/api_schemas/events/get_all_events_response.py +99 -0
- mmisp/api_schemas/events/get_event_response.py +8 -0
- mmisp/api_schemas/events/index_events_body.py +30 -0
- mmisp/api_schemas/events/index_events_response.py +40 -0
- mmisp/api_schemas/events/publish_event_response.py +13 -0
- mmisp/api_schemas/events/search_events_body.py +43 -0
- mmisp/api_schemas/events/search_events_response.py +10 -0
- mmisp/api_schemas/events/unpublish_event_response.py +13 -0
- mmisp/api_schemas/feeds/__init__.py +0 -0
- mmisp/api_schemas/feeds/cache_feed_response.py +12 -0
- mmisp/api_schemas/feeds/create_feed_body.py +30 -0
- mmisp/api_schemas/feeds/enable_disable_feed_response.py +10 -0
- mmisp/api_schemas/feeds/fetch_feeds_response.py +8 -0
- mmisp/api_schemas/feeds/get_feed_response.py +47 -0
- mmisp/api_schemas/feeds/toggle_feed_body.py +8 -0
- mmisp/api_schemas/feeds/update_feed_body.py +30 -0
- mmisp/api_schemas/galaxies/__init__.py +0 -0
- mmisp/api_schemas/galaxies/attach_galaxy_cluster_body.py +12 -0
- mmisp/api_schemas/galaxies/attach_galaxy_cluster_response.py +10 -0
- mmisp/api_schemas/galaxies/delete_force_update_import_galaxy_response.py +12 -0
- mmisp/api_schemas/galaxies/export_galaxies_body.py +16 -0
- mmisp/api_schemas/galaxies/export_galaxies_response.py +44 -0
- mmisp/api_schemas/galaxies/galaxy_schema.py +18 -0
- mmisp/api_schemas/galaxies/get_all_search_galaxies_response.py +22 -0
- mmisp/api_schemas/galaxies/get_galaxy_response.py +37 -0
- mmisp/api_schemas/galaxies/import_galaxies_body.py +15 -0
- mmisp/api_schemas/galaxies/search_galaxies_body.py +22 -0
- mmisp/api_schemas/noticelists/__init__.py +0 -0
- mmisp/api_schemas/noticelists/get_all_noticelist_response.py +10 -0
- mmisp/api_schemas/noticelists/get_noticelist_response.py +38 -0
- mmisp/api_schemas/objects/__init__.py +0 -0
- mmisp/api_schemas/objects/create_object_body.py +19 -0
- mmisp/api_schemas/objects/get_object_response.py +50 -0
- mmisp/api_schemas/objects/search_objects_body.py +49 -0
- mmisp/api_schemas/organisations/__init__.py +0 -0
- mmisp/api_schemas/organisations/organisation.py +24 -0
- mmisp/api_schemas/roles/__init__.py +0 -0
- mmisp/api_schemas/roles/role.py +71 -0
- mmisp/api_schemas/sharing_groups/__init__.py +0 -0
- mmisp/api_schemas/sharing_groups/add_org_to_sharing_group_body.py +6 -0
- mmisp/api_schemas/sharing_groups/add_org_to_sharing_group_legacy_body.py +5 -0
- mmisp/api_schemas/sharing_groups/add_server_to_sharing_group_body.py +6 -0
- mmisp/api_schemas/sharing_groups/add_server_to_sharing_group_legacy_body.py +5 -0
- mmisp/api_schemas/sharing_groups/create_sharing_group_body.py +12 -0
- mmisp/api_schemas/sharing_groups/create_sharing_group_legacy_body.py +23 -0
- mmisp/api_schemas/sharing_groups/create_sharing_group_legacy_response.py +18 -0
- mmisp/api_schemas/sharing_groups/delete_sharing_group_legacy_response.py +5 -0
- mmisp/api_schemas/sharing_groups/get_all_sharing_groups_response.py +53 -0
- mmisp/api_schemas/sharing_groups/get_sharing_group_info_response.py +44 -0
- mmisp/api_schemas/sharing_groups/sharing_group.py +19 -0
- mmisp/api_schemas/sharing_groups/sharing_group_org.py +8 -0
- mmisp/api_schemas/sharing_groups/sharing_group_server.py +8 -0
- mmisp/api_schemas/sharing_groups/update_sharing_group_body.py +10 -0
- mmisp/api_schemas/sharing_groups/update_sharing_group_legacy_body.py +28 -0
- mmisp/api_schemas/sharing_groups/view_update_sharing_group_legacy_response.py +40 -0
- mmisp/api_schemas/sightings/__init__.py +0 -0
- mmisp/api_schemas/sightings/create_sighting_body.py +49 -0
- mmisp/api_schemas/sightings/get_sighting_response.py +27 -0
- mmisp/api_schemas/standard_status_response.py +13 -0
- mmisp/api_schemas/tags/__init__.py +0 -0
- mmisp/api_schemas/tags/create_tag_body.py +15 -0
- mmisp/api_schemas/tags/delete_tag_response.py +10 -0
- mmisp/api_schemas/tags/get_tag_response.py +31 -0
- mmisp/api_schemas/tags/search_tags_response.py +26 -0
- mmisp/api_schemas/tags/update_tag_body.py +15 -0
- mmisp/api_schemas/taxonomies/__init__.py +0 -0
- mmisp/api_schemas/taxonomies/export_taxonomies_response.py +30 -0
- mmisp/api_schemas/taxonomies/get_taxonomy_by_id_response.py +30 -0
- mmisp/api_schemas/taxonomies/get_taxonomy_response.py +21 -0
- mmisp/api_schemas/taxonomies/get_taxonomy_tags_response.py +32 -0
- mmisp/api_schemas/user_settings/__init__.py +0 -0
- mmisp/api_schemas/user_settings/get_uid_user_setting_response.py +21 -0
- mmisp/api_schemas/user_settings/get_user_settings_response.py +13 -0
- mmisp/api_schemas/user_settings/search_user_setting_body.py +7 -0
- mmisp/api_schemas/user_settings/search_user_setting_response.py +11 -0
- mmisp/api_schemas/user_settings/set_user_setting_body.py +5 -0
- mmisp/api_schemas/user_settings/set_user_setting_response.py +13 -0
- mmisp/api_schemas/user_settings/view_user_setting_response.py +13 -0
- mmisp/api_schemas/users/__init__.py +0 -0
- mmisp/api_schemas/users/user.py +42 -0
- mmisp/api_schemas/users/users_view_me_response.py +12 -0
- mmisp/api_schemas/warninglists/__init__.py +0 -0
- mmisp/api_schemas/warninglists/check_value_warninglists_body.py +8 -0
- mmisp/api_schemas/warninglists/check_value_warninglists_response.py +14 -0
- mmisp/api_schemas/warninglists/create_warninglist_body.py +220 -0
- mmisp/api_schemas/warninglists/delete_warninglist_response.py +13 -0
- mmisp/api_schemas/warninglists/get_selected_all_warninglists_response.py +14 -0
- mmisp/api_schemas/warninglists/get_selected_warninglists_body.py +9 -0
- mmisp/api_schemas/warninglists/toggle_enable_warninglists_body.py +10 -0
- mmisp/api_schemas/warninglists/toggle_enable_warninglists_response.py +10 -0
- mmisp/api_schemas/warninglists/warninglist_response.py +42 -0
- mmisp/db/__init__.py +0 -0
- mmisp/db/config.py +17 -0
- mmisp/db/database.py +42 -0
- mmisp/db/models/__init__.py +0 -0
- mmisp/db/models/attribute.py +92 -0
- mmisp/db/models/auth_key.py +24 -0
- mmisp/db/models/event.py +62 -0
- mmisp/db/models/feed.py +32 -0
- mmisp/db/models/galaxy.py +22 -0
- mmisp/db/models/galaxy_cluster.py +52 -0
- mmisp/db/models/identity_provider.py +22 -0
- mmisp/db/models/noticelist.py +22 -0
- mmisp/db/models/object.py +39 -0
- mmisp/db/models/organisation.py +26 -0
- mmisp/db/models/role.py +42 -0
- mmisp/db/models/server.py +33 -0
- mmisp/db/models/sharing_group.py +43 -0
- mmisp/db/models/sighting.py +21 -0
- mmisp/db/models/tag.py +19 -0
- mmisp/db/models/taxonomy.py +41 -0
- mmisp/db/models/user.py +44 -0
- mmisp/db/models/user_setting.py +29 -0
- mmisp/db/models/warninglist.py +33 -0
- mmisp/db/print_changes.py +59 -0
- mmisp/lib/__init__.py +0 -0
- mmisp/lib/attributes.py +1386 -0
- mmisp_lib-0.1.0.dist-info/METADATA +77 -0
- mmisp_lib-0.1.0.dist-info/RECORD +161 -0
- mmisp_lib-0.1.0.dist-info/WHEEL +5 -0
- mmisp_lib-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
from pydantic import BaseModel
|
2
|
+
|
3
|
+
|
4
|
+
class SearchGetAuthKeysResponseItemUser(BaseModel):
|
5
|
+
id: str
|
6
|
+
email: str
|
7
|
+
|
8
|
+
|
9
|
+
class SearchGetAuthKeysResponseItemAuthKey(BaseModel):
|
10
|
+
id: str
|
11
|
+
uuid: str
|
12
|
+
authkey_start: str
|
13
|
+
authkey_end: str
|
14
|
+
created: str
|
15
|
+
expiration: str
|
16
|
+
read_only: bool
|
17
|
+
user_id: str
|
18
|
+
comment: str | None
|
19
|
+
allowed_ips: list[str] | None = None
|
20
|
+
unique_ips: list[str] | None = []
|
21
|
+
|
22
|
+
|
23
|
+
class SearchGetAuthKeysResponseItem(BaseModel):
|
24
|
+
AuthKey: SearchGetAuthKeysResponseItemAuthKey
|
25
|
+
User: SearchGetAuthKeysResponseItemUser
|
26
|
+
|
27
|
+
class Config:
|
28
|
+
orm_mode = True
|
@@ -0,0 +1,24 @@
|
|
1
|
+
from datetime import datetime
|
2
|
+
|
3
|
+
from pydantic import BaseModel
|
4
|
+
|
5
|
+
from .search_get_all_auth_keys_users_response import SearchGetAuthKeysResponseItemUser
|
6
|
+
|
7
|
+
|
8
|
+
class ViewAuthKeyResponseWrapper(BaseModel):
|
9
|
+
id: str
|
10
|
+
uuid: str
|
11
|
+
authkey_start: str
|
12
|
+
authkey_end: str
|
13
|
+
created: datetime
|
14
|
+
expiration: int
|
15
|
+
read_only: bool
|
16
|
+
user_id: str
|
17
|
+
comment: str
|
18
|
+
allowed_ips: list[str] | None = None
|
19
|
+
unique_ips: list[str] | None = []
|
20
|
+
|
21
|
+
|
22
|
+
class ViewAuthKeysResponse(BaseModel):
|
23
|
+
AuthKey: ViewAuthKeyResponseWrapper
|
24
|
+
User: SearchGetAuthKeysResponseItemUser
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
from enum import Enum
|
2
|
+
|
3
|
+
from pydantic import BaseModel
|
4
|
+
|
5
|
+
|
6
|
+
class LoginType(Enum):
|
7
|
+
PASSWORD = "password"
|
8
|
+
IDENTITY_PROVIDER = "idp"
|
9
|
+
|
10
|
+
|
11
|
+
class IdentityProviderInfo(BaseModel):
|
12
|
+
id: str
|
13
|
+
name: str
|
14
|
+
|
15
|
+
class Config:
|
16
|
+
orm_mode = True
|
17
|
+
|
18
|
+
|
19
|
+
class StartLoginResponse(BaseModel):
|
20
|
+
loginType: LoginType
|
21
|
+
identityProviders: list[IdentityProviderInfo] = []
|
@@ -0,0 +1,17 @@
|
|
1
|
+
from pydantic import BaseModel
|
2
|
+
|
3
|
+
|
4
|
+
class FreeTextImportWorkerUser(BaseModel):
|
5
|
+
user_id: int
|
6
|
+
|
7
|
+
|
8
|
+
class FreeTextImportWorkerData(BaseModel):
|
9
|
+
data: str
|
10
|
+
|
11
|
+
|
12
|
+
class FreeTextImportWorkerBody(BaseModel):
|
13
|
+
user: FreeTextImportWorkerUser
|
14
|
+
data: FreeTextImportWorkerData
|
15
|
+
|
16
|
+
class Config:
|
17
|
+
orm_mode = True
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
from pydantic import BaseModel
|
2
|
+
|
3
|
+
|
4
|
+
class AddAttributeViaFreeTextImportEventAttributes(BaseModel):
|
5
|
+
value: str
|
6
|
+
|
7
|
+
|
8
|
+
class AddAttributeViaFreeTextImportEventBody(BaseModel):
|
9
|
+
Attribute: AddAttributeViaFreeTextImportEventAttributes
|
10
|
+
|
11
|
+
class Config:
|
12
|
+
orm_mode = True
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from pydantic import BaseModel
|
2
|
+
|
3
|
+
|
4
|
+
class AddAttributeViaFreeTextImportEventResponse(BaseModel):
|
5
|
+
comment: str | None = None
|
6
|
+
value: str
|
7
|
+
original_value: str
|
8
|
+
to_ids: str
|
9
|
+
type: str
|
10
|
+
category: str
|
11
|
+
distribution: str
|
12
|
+
|
13
|
+
class Config:
|
14
|
+
orm_mode = True
|
@@ -0,0 +1,234 @@
|
|
1
|
+
from pydantic import BaseModel
|
2
|
+
|
3
|
+
from ..organisations.organisation import Organisation
|
4
|
+
|
5
|
+
|
6
|
+
class AddEditGetEventGalaxyClusterMeta(BaseModel):
|
7
|
+
external_id: str | None = None
|
8
|
+
refs: list[str] | None = None
|
9
|
+
kill_chain: str | None = None
|
10
|
+
|
11
|
+
|
12
|
+
class AddEditGetEventGalaxyClusterRelationTag(BaseModel):
|
13
|
+
id: str
|
14
|
+
name: str
|
15
|
+
colour: str
|
16
|
+
exportable: bool
|
17
|
+
org_id: str
|
18
|
+
user_id: str
|
19
|
+
hide_tag: bool
|
20
|
+
numerical_value: str
|
21
|
+
is_galaxy: bool
|
22
|
+
is_custom_galaxy: bool
|
23
|
+
local_only: bool
|
24
|
+
|
25
|
+
|
26
|
+
class AddEditGetEventGalaxyClusterRelation(BaseModel):
|
27
|
+
id: str
|
28
|
+
galaxy_cluster_id: str
|
29
|
+
referenced_galaxy_cluster_id: str
|
30
|
+
referenced_galaxy_cluster_uuid: str
|
31
|
+
referenced_galaxy_cluster_type: str
|
32
|
+
galaxy_cluster_uuid: str
|
33
|
+
distribution: str
|
34
|
+
sharing_group_id: str | None = None
|
35
|
+
default: bool
|
36
|
+
Tag: list[AddEditGetEventGalaxyClusterRelationTag] = []
|
37
|
+
|
38
|
+
|
39
|
+
class AddEditGetEventGalaxyCluster(BaseModel):
|
40
|
+
id: str
|
41
|
+
uuid: str
|
42
|
+
collection_uuid: str
|
43
|
+
type: str
|
44
|
+
value: str
|
45
|
+
tag_name: str
|
46
|
+
description: str
|
47
|
+
galaxy_id: str
|
48
|
+
source: str
|
49
|
+
authors: list[str]
|
50
|
+
version: str
|
51
|
+
distribution: str | None = None
|
52
|
+
sharing_group_id: str | None = None
|
53
|
+
org_id: str
|
54
|
+
orgc_id: str
|
55
|
+
default: bool | None = None
|
56
|
+
locked: bool | None = None
|
57
|
+
extends_uuid: str | None = None
|
58
|
+
extends_version: str | None = None
|
59
|
+
published: bool | None = None
|
60
|
+
deleted: bool | None = None
|
61
|
+
GalaxyClusterRelation: list[AddEditGetEventGalaxyClusterRelation] = []
|
62
|
+
Org: Organisation | None = None
|
63
|
+
Orgc: Organisation | None = None
|
64
|
+
meta: AddEditGetEventGalaxyClusterMeta | None = None
|
65
|
+
tag_id: str
|
66
|
+
attribute_tag_id: str | None = None
|
67
|
+
event_tag_id: str | None = None
|
68
|
+
local: bool | None = None
|
69
|
+
relationship_type: str = ""
|
70
|
+
|
71
|
+
|
72
|
+
class AddEditGetEventGalaxy(BaseModel):
|
73
|
+
id: str
|
74
|
+
uuid: str
|
75
|
+
name: str
|
76
|
+
type: str
|
77
|
+
description: str
|
78
|
+
version: str
|
79
|
+
icon: str
|
80
|
+
namespace: str
|
81
|
+
enabled: bool
|
82
|
+
local_only: bool
|
83
|
+
kill_chain_order: str | None = None
|
84
|
+
GalaxyCluster: list[AddEditGetEventGalaxyCluster] = []
|
85
|
+
|
86
|
+
|
87
|
+
class AddEditGetEventOrg(BaseModel):
|
88
|
+
id: str
|
89
|
+
name: str
|
90
|
+
uuid: str
|
91
|
+
local: bool | None = None
|
92
|
+
|
93
|
+
|
94
|
+
class AddEditGetEventShadowAttribute(BaseModel):
|
95
|
+
value: str
|
96
|
+
to_ids: bool
|
97
|
+
type: str
|
98
|
+
category: str
|
99
|
+
|
100
|
+
|
101
|
+
class AddEditGetEventRelatedEventAttributesOrg(BaseModel):
|
102
|
+
id: str
|
103
|
+
name: str
|
104
|
+
uuid: str
|
105
|
+
|
106
|
+
|
107
|
+
class AddEditGetEventRelatedEventAttributes(BaseModel):
|
108
|
+
id: str
|
109
|
+
date: str
|
110
|
+
threat_level_id: str
|
111
|
+
info: str
|
112
|
+
published: str
|
113
|
+
uuid: str
|
114
|
+
analysis: str
|
115
|
+
timestamp: str
|
116
|
+
distribution: str
|
117
|
+
org_id: str
|
118
|
+
orgc_id: str
|
119
|
+
Org: AddEditGetEventRelatedEventAttributesOrg
|
120
|
+
Orgc: AddEditGetEventRelatedEventAttributesOrg
|
121
|
+
|
122
|
+
|
123
|
+
class AddEditGetEventRelatedEvent(BaseModel):
|
124
|
+
Event: list[AddEditGetEventRelatedEventAttributes] = []
|
125
|
+
|
126
|
+
|
127
|
+
class AddEditGetEventTag(BaseModel):
|
128
|
+
id: str
|
129
|
+
name: str
|
130
|
+
colour: str
|
131
|
+
exportable: str
|
132
|
+
user_id: str
|
133
|
+
hide_tag: bool
|
134
|
+
numerical_value: int | None = None
|
135
|
+
is_galaxy: bool
|
136
|
+
is_custom_galaxy: bool
|
137
|
+
local_only: bool
|
138
|
+
local: int
|
139
|
+
relationship_type: str | None = None
|
140
|
+
|
141
|
+
|
142
|
+
class AddEditGetEventAttribute(BaseModel):
|
143
|
+
id: str
|
144
|
+
event_id: str
|
145
|
+
object_id: str
|
146
|
+
object_relation: str | None = None
|
147
|
+
category: str
|
148
|
+
type: str
|
149
|
+
value: str
|
150
|
+
to_ids: bool
|
151
|
+
uuid: str
|
152
|
+
timestamp: str
|
153
|
+
distribution: str
|
154
|
+
sharing_group_id: str
|
155
|
+
comment: str | None = None
|
156
|
+
deleted: bool
|
157
|
+
disable_correlation: bool
|
158
|
+
first_seen: str | None = None
|
159
|
+
last_seen: str | None = None
|
160
|
+
Galaxy: list[AddEditGetEventGalaxy] = []
|
161
|
+
ShadowAttribute: list[str] = []
|
162
|
+
Tag: list[AddEditGetEventTag] = []
|
163
|
+
|
164
|
+
|
165
|
+
class AddEditGetEventObject(BaseModel):
|
166
|
+
id: str
|
167
|
+
name: str
|
168
|
+
meta_category: str
|
169
|
+
description: str
|
170
|
+
template_uuid: str
|
171
|
+
template_version: str
|
172
|
+
event_id: str
|
173
|
+
uuid: str
|
174
|
+
timestamp: str
|
175
|
+
distribution: str
|
176
|
+
sharing_group_id: str
|
177
|
+
comment: str
|
178
|
+
deleted: bool
|
179
|
+
first_seen: str | None = None
|
180
|
+
last_seen: str | None = None
|
181
|
+
ObjectReference: list[str] = []
|
182
|
+
Attribute: list[AddEditGetEventAttribute] = []
|
183
|
+
|
184
|
+
|
185
|
+
class AddEditGetEventEventReport(BaseModel):
|
186
|
+
id: str
|
187
|
+
uuid: str
|
188
|
+
event_id: str
|
189
|
+
name: str
|
190
|
+
content: str
|
191
|
+
distribution: str
|
192
|
+
sharing_group_id: str
|
193
|
+
timestamp: str
|
194
|
+
deleted: bool
|
195
|
+
|
196
|
+
|
197
|
+
class AddEditGetEventDetails(BaseModel):
|
198
|
+
id: str
|
199
|
+
orgc_id: str
|
200
|
+
org_id: str
|
201
|
+
date: str
|
202
|
+
threat_level_id: str
|
203
|
+
info: str
|
204
|
+
published: bool
|
205
|
+
uuid: str
|
206
|
+
attribute_count: str
|
207
|
+
analysis: str
|
208
|
+
timestamp: str
|
209
|
+
distribution: str
|
210
|
+
proposal_email_lock: bool
|
211
|
+
locked: bool
|
212
|
+
publish_timestamp: str
|
213
|
+
sharing_group_id: str
|
214
|
+
disable_correlation: bool
|
215
|
+
extends_uuid: str
|
216
|
+
protected: bool | None = None
|
217
|
+
event_creator_email: str
|
218
|
+
Org: AddEditGetEventOrg
|
219
|
+
Orgc: AddEditGetEventOrg
|
220
|
+
Attribute: list[AddEditGetEventAttribute] = []
|
221
|
+
ShadowAttribute: list[AddEditGetEventShadowAttribute] = []
|
222
|
+
RelatedEvent: list[AddEditGetEventEventReport] = []
|
223
|
+
Galaxy: list[AddEditGetEventGalaxy] = []
|
224
|
+
Object: list[AddEditGetEventObject] = []
|
225
|
+
EventReport: list[AddEditGetEventEventReport] = []
|
226
|
+
CryptographicKey: list[str] = []
|
227
|
+
Tag: list[AddEditGetEventTag] = []
|
228
|
+
|
229
|
+
|
230
|
+
class AddEditGetEventResponse(BaseModel):
|
231
|
+
Event: AddEditGetEventDetails
|
232
|
+
|
233
|
+
class Config:
|
234
|
+
orm_mode = True
|
@@ -0,0 +1,30 @@
|
|
1
|
+
from pydantic import BaseModel
|
2
|
+
|
3
|
+
|
4
|
+
class AddEventTag(BaseModel):
|
5
|
+
name: str
|
6
|
+
|
7
|
+
|
8
|
+
class AddEventBody(BaseModel):
|
9
|
+
info: str
|
10
|
+
org_id: str | None = None
|
11
|
+
distribution: str | None = None
|
12
|
+
orgc_id: str | None = None
|
13
|
+
uuid: str | None = None
|
14
|
+
date: str | None = None
|
15
|
+
published: bool | None = None
|
16
|
+
analysis: str | None = None
|
17
|
+
attribute_count: str | None = None
|
18
|
+
timestamp: str | None = None
|
19
|
+
sharing_group_id: str | None = None
|
20
|
+
proposal_email_lock: bool | None = None
|
21
|
+
locked: bool | None = None
|
22
|
+
threat_level_id: str | None = None
|
23
|
+
publish_timestamp: str | None = None
|
24
|
+
sighting_timestamp: str | None = None
|
25
|
+
disable_correlation: bool | None = None
|
26
|
+
extends_uuid: str | None = None
|
27
|
+
protected: str | None = None
|
28
|
+
|
29
|
+
class Config:
|
30
|
+
orm_mode = True
|
@@ -0,0 +1,28 @@
|
|
1
|
+
from pydantic import BaseModel
|
2
|
+
|
3
|
+
|
4
|
+
class EditEventBody(BaseModel):
|
5
|
+
info: str | None = None
|
6
|
+
org_id: str | None = None
|
7
|
+
distribution: str | None = None
|
8
|
+
orgc_id: str | None = None
|
9
|
+
uuid: str | None = None
|
10
|
+
date: str | None = None
|
11
|
+
published: bool | None = None
|
12
|
+
analysis: str | None = None
|
13
|
+
attribute_count: str | None = None
|
14
|
+
timestamp: str | None = None
|
15
|
+
sharing_group_id: str | None = None
|
16
|
+
proposal_email_lock: bool | None = None
|
17
|
+
locked: bool | None = None
|
18
|
+
threat_level_id: str | None = None
|
19
|
+
publish_timestamp: str | None = None
|
20
|
+
sighting_timestamp: str | None = None
|
21
|
+
disable_correlation: bool | None = None
|
22
|
+
extends_uuid: str | None = None
|
23
|
+
event_creator_email: str | None = None
|
24
|
+
protected: str | None = None
|
25
|
+
cryptographic_key: str | None = None
|
26
|
+
|
27
|
+
class Config:
|
28
|
+
orm_mode = True
|
@@ -0,0 +1,99 @@
|
|
1
|
+
from pydantic import BaseModel
|
2
|
+
|
3
|
+
from .add_edit_get_event_response import AddEditGetEventGalaxyClusterMeta
|
4
|
+
|
5
|
+
|
6
|
+
class GetAllEventsOrg(BaseModel):
|
7
|
+
id: str
|
8
|
+
name: str
|
9
|
+
uuid: str
|
10
|
+
|
11
|
+
|
12
|
+
class GetAllEventsGalaxyClusterGalaxy(BaseModel):
|
13
|
+
id: str
|
14
|
+
uuid: str
|
15
|
+
name: str
|
16
|
+
type: str
|
17
|
+
description: str
|
18
|
+
version: str
|
19
|
+
icon: str
|
20
|
+
namespace: str
|
21
|
+
enabled: bool
|
22
|
+
local_only: bool
|
23
|
+
kill_chain_order: str | None = None
|
24
|
+
|
25
|
+
|
26
|
+
class GetAllEventsGalaxyCluster(BaseModel):
|
27
|
+
id: str
|
28
|
+
uuid: str
|
29
|
+
collection_uuid: str
|
30
|
+
type: str
|
31
|
+
value: str
|
32
|
+
tag_name: str
|
33
|
+
description: str
|
34
|
+
galaxy_id: str
|
35
|
+
source: str
|
36
|
+
authors: list[str]
|
37
|
+
version: str
|
38
|
+
distribution: str | None = None
|
39
|
+
sharing_group_id: str | None = None
|
40
|
+
org_id: str
|
41
|
+
orgc_id: str
|
42
|
+
default: str | None = None
|
43
|
+
locked: bool | None = None
|
44
|
+
extends_uuid: str
|
45
|
+
extends_version: str
|
46
|
+
published: bool | None = None
|
47
|
+
deleted: bool | None = None
|
48
|
+
Galaxy: GetAllEventsGalaxyClusterGalaxy
|
49
|
+
meta: AddEditGetEventGalaxyClusterMeta | None = None
|
50
|
+
tag_id: str
|
51
|
+
local: bool | None = None
|
52
|
+
relationship_type: str | None = None
|
53
|
+
|
54
|
+
|
55
|
+
class GetAllEventsEventTagTag(BaseModel):
|
56
|
+
id: str
|
57
|
+
name: str
|
58
|
+
colour: str
|
59
|
+
is_galaxy: bool
|
60
|
+
|
61
|
+
|
62
|
+
class GetAllEventsEventTag(BaseModel):
|
63
|
+
id: str
|
64
|
+
event_id: str
|
65
|
+
tag_id: str
|
66
|
+
local: bool
|
67
|
+
relationship_type: str
|
68
|
+
Tag: GetAllEventsEventTagTag
|
69
|
+
|
70
|
+
|
71
|
+
class GetAllEventsResponse(BaseModel):
|
72
|
+
id: str
|
73
|
+
org_id: str # owner org
|
74
|
+
distribution: str
|
75
|
+
info: str
|
76
|
+
orgc_id: str # creator org
|
77
|
+
uuid: str
|
78
|
+
date: str
|
79
|
+
published: bool
|
80
|
+
analysis: str
|
81
|
+
attribute_count: str
|
82
|
+
timestamp: str
|
83
|
+
sharing_group_id: str
|
84
|
+
proposal_email_lock: bool
|
85
|
+
locked: bool
|
86
|
+
threat_level_id: str
|
87
|
+
publish_timestamp: str
|
88
|
+
sighting_timestamp: str
|
89
|
+
disable_correlation: bool
|
90
|
+
extends_uuid: str
|
91
|
+
event_creator_email: str # omitted
|
92
|
+
protected: str | None = None
|
93
|
+
Org: GetAllEventsOrg
|
94
|
+
Orgc: GetAllEventsOrg
|
95
|
+
GalaxyCluster: list[GetAllEventsGalaxyCluster]
|
96
|
+
EventTag: list[GetAllEventsEventTag]
|
97
|
+
|
98
|
+
class Config:
|
99
|
+
orm_mode = True
|
@@ -0,0 +1,30 @@
|
|
1
|
+
from pydantic import BaseModel
|
2
|
+
|
3
|
+
|
4
|
+
class IndexEventsBody(BaseModel):
|
5
|
+
page: int | None = None
|
6
|
+
limit: int | None = None
|
7
|
+
sort: int | None = None
|
8
|
+
direction: int | None = None
|
9
|
+
minimal: bool | None = None
|
10
|
+
attribute: str | None = None
|
11
|
+
eventid: str | None = None
|
12
|
+
datefrom: str | None = None
|
13
|
+
dateuntil: str | None = None
|
14
|
+
org: str | None = None
|
15
|
+
eventinfo: str | None = None
|
16
|
+
tag: str | None = None
|
17
|
+
tags: list[str] | None = None
|
18
|
+
distribution: str | None = None
|
19
|
+
sharinggroup: str | None = None
|
20
|
+
analysis: str | None = None
|
21
|
+
threatlevel: str | None = None
|
22
|
+
email: str | None = None
|
23
|
+
hasproposal: str | None = None
|
24
|
+
timestamp: str | None = None
|
25
|
+
publish_timestamp: str | None = None
|
26
|
+
searchDatefrom: str | None = None
|
27
|
+
searchDateuntil: str | None = None
|
28
|
+
|
29
|
+
class Config:
|
30
|
+
orm_mode = True
|
@@ -0,0 +1,40 @@
|
|
1
|
+
from pydantic import BaseModel
|
2
|
+
|
3
|
+
from .get_all_events_response import GetAllEventsGalaxyCluster, GetAllEventsOrg
|
4
|
+
|
5
|
+
|
6
|
+
class IndexEventsEventTag(BaseModel):
|
7
|
+
id: str
|
8
|
+
event_id: str
|
9
|
+
tag_id: str
|
10
|
+
local: bool
|
11
|
+
|
12
|
+
|
13
|
+
class IndexEventsAttributes(BaseModel):
|
14
|
+
id: str
|
15
|
+
org_id: str
|
16
|
+
date: str
|
17
|
+
info: str
|
18
|
+
uuid: str
|
19
|
+
published: bool
|
20
|
+
analysis: str
|
21
|
+
attribute_count: str
|
22
|
+
orgc_id: str
|
23
|
+
timestamp: str
|
24
|
+
distribution: str
|
25
|
+
sharing_group_id: str
|
26
|
+
proposal_email_lock: bool
|
27
|
+
locked: bool
|
28
|
+
threat_level_id: str
|
29
|
+
publish_timestamp: str
|
30
|
+
sighting_timestamp: str
|
31
|
+
disable_correlation: bool
|
32
|
+
extends_uuid: str
|
33
|
+
protected: bool | None = None
|
34
|
+
Org: GetAllEventsOrg
|
35
|
+
Orgc: GetAllEventsOrg
|
36
|
+
GalaxyCluster: list[GetAllEventsGalaxyCluster] = []
|
37
|
+
EventTag: list[IndexEventsEventTag] = []
|
38
|
+
|
39
|
+
class Config:
|
40
|
+
orm_mode = True
|