mihari 5.4.1 → 5.4.2
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.
- checksums.yaml +4 -4
- data/frontend/package-lock.json +145 -146
- data/frontend/package.json +8 -8
- data/frontend/src/swagger.yaml +306 -272
- data/lib/mihari/cli/alert.rb +11 -0
- data/lib/mihari/cli/main.rb +6 -1
- data/lib/mihari/commands/alert.rb +42 -0
- data/lib/mihari/commands/rule.rb +2 -2
- data/lib/mihari/commands/search.rb +20 -59
- data/lib/mihari/config.rb +1 -1
- data/lib/mihari/emitters/base.rb +1 -1
- data/lib/mihari/emitters/database.rb +2 -2
- data/lib/mihari/errors.rb +23 -2
- data/lib/mihari/http.rb +7 -1
- data/lib/mihari/schemas/alert.rb +14 -0
- data/lib/mihari/services/alert_proxy.rb +106 -0
- data/lib/mihari/services/alert_runner.rb +22 -0
- data/lib/mihari/services/{rule.rb → rule_proxy.rb} +10 -6
- data/lib/mihari/services/rule_runner.rb +49 -0
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/endpoints/alerts.rb +22 -0
- data/lib/mihari/web/endpoints/rules.rb +8 -8
- data/lib/mihari/web/public/assets/{index-61dc587c.js → index-4d7eda9f.js} +1 -1
- data/lib/mihari/web/public/index.html +1 -1
- data/lib/mihari/web/public/redoc-static.html +29 -27
- data/lib/mihari.rb +6 -1
- data/mihari.gemspec +2 -3
- metadata +14 -23
- data/Steepfile +0 -31
data/frontend/src/swagger.yaml
CHANGED
|
@@ -2,443 +2,446 @@
|
|
|
2
2
|
info:
|
|
3
3
|
title: Mihari API
|
|
4
4
|
version: 0.0.1
|
|
5
|
-
swagger:
|
|
5
|
+
swagger: '2.0'
|
|
6
6
|
produces:
|
|
7
|
-
|
|
7
|
+
- application/json
|
|
8
8
|
tags:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
- name: alerts
|
|
10
|
+
description: Operations about alerts
|
|
11
|
+
- name: artifacts
|
|
12
|
+
description: Operations about artifacts
|
|
13
|
+
- name: configs
|
|
14
|
+
description: Operations about configs
|
|
15
|
+
- name: ip_addresses
|
|
16
|
+
description: Operations about ip_addresses
|
|
17
|
+
- name: rules
|
|
18
|
+
description: Operations about rules
|
|
19
|
+
- name: tags
|
|
20
|
+
description: Operations about tags
|
|
21
21
|
paths:
|
|
22
|
-
"/api/alerts
|
|
23
|
-
|
|
24
|
-
summary:
|
|
25
|
-
description:
|
|
22
|
+
"/api/alerts":
|
|
23
|
+
post:
|
|
24
|
+
summary: Create an alert
|
|
25
|
+
description: Create an alert
|
|
26
26
|
produces:
|
|
27
|
-
|
|
27
|
+
- application/json
|
|
28
|
+
consumes:
|
|
29
|
+
- application/json
|
|
28
30
|
parameters:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
- name: postApiAlerts
|
|
32
|
+
in: body
|
|
33
|
+
required: true
|
|
34
|
+
schema:
|
|
35
|
+
"$ref": "#/definitions/postApiAlerts"
|
|
34
36
|
responses:
|
|
35
|
-
|
|
36
|
-
description:
|
|
37
|
-
schema:
|
|
38
|
-
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
39
|
-
"404":
|
|
40
|
-
description: Not found
|
|
37
|
+
'201':
|
|
38
|
+
description: Create an alert
|
|
41
39
|
schema:
|
|
42
|
-
"$ref": "#/definitions/
|
|
40
|
+
"$ref": "#/definitions/Mihari_Entities_Alert"
|
|
43
41
|
tags:
|
|
44
|
-
|
|
45
|
-
"/api/alerts":
|
|
42
|
+
- alerts
|
|
46
43
|
get:
|
|
47
44
|
summary: Search alerts
|
|
48
45
|
description: Search alerts
|
|
49
46
|
produces:
|
|
50
|
-
|
|
47
|
+
- application/json
|
|
51
48
|
parameters:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
49
|
+
- in: query
|
|
50
|
+
name: page
|
|
51
|
+
type: integer
|
|
52
|
+
format: int32
|
|
53
|
+
default: 1
|
|
54
|
+
required: false
|
|
55
|
+
- in: query
|
|
56
|
+
name: limit
|
|
57
|
+
type: integer
|
|
58
|
+
format: int32
|
|
59
|
+
default: 10
|
|
60
|
+
required: false
|
|
61
|
+
- in: query
|
|
62
|
+
name: artifact
|
|
63
|
+
type: string
|
|
64
|
+
required: false
|
|
65
|
+
- in: query
|
|
66
|
+
name: rule_id
|
|
67
|
+
type: string
|
|
68
|
+
required: false
|
|
69
|
+
- in: query
|
|
70
|
+
name: tag
|
|
71
|
+
type: string
|
|
72
|
+
required: false
|
|
73
|
+
- in: query
|
|
74
|
+
name: fromAt
|
|
75
|
+
type: string
|
|
76
|
+
format: date-time
|
|
77
|
+
required: false
|
|
78
|
+
- in: query
|
|
79
|
+
name: toAt
|
|
80
|
+
type: string
|
|
81
|
+
format: date-time
|
|
82
|
+
required: false
|
|
86
83
|
responses:
|
|
87
|
-
|
|
84
|
+
'200':
|
|
88
85
|
description: Search alerts
|
|
89
86
|
schema:
|
|
90
87
|
type: array
|
|
91
88
|
items:
|
|
92
89
|
"$ref": "#/definitions/Mihari_Entities_AlertsWithPagination"
|
|
93
|
-
|
|
90
|
+
'404':
|
|
91
|
+
description: Not found
|
|
92
|
+
schema:
|
|
93
|
+
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
94
|
+
tags:
|
|
95
|
+
- alerts
|
|
96
|
+
"/api/alerts/{id}":
|
|
97
|
+
delete:
|
|
98
|
+
summary: Delete an alert
|
|
99
|
+
description: Delete an alert
|
|
100
|
+
produces:
|
|
101
|
+
- application/json
|
|
102
|
+
parameters:
|
|
103
|
+
- in: path
|
|
104
|
+
name: id
|
|
105
|
+
type: integer
|
|
106
|
+
format: int32
|
|
107
|
+
required: true
|
|
108
|
+
responses:
|
|
109
|
+
'200':
|
|
110
|
+
description: Delete an alert
|
|
111
|
+
schema:
|
|
112
|
+
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
113
|
+
'404':
|
|
94
114
|
description: Not found
|
|
95
115
|
schema:
|
|
96
116
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
97
117
|
tags:
|
|
98
|
-
|
|
118
|
+
- alerts
|
|
99
119
|
"/api/artifacts/{id}":
|
|
100
120
|
delete:
|
|
101
121
|
summary: Delete an artifact
|
|
102
122
|
description: Delete an artifact
|
|
103
123
|
produces:
|
|
104
|
-
|
|
124
|
+
- application/json
|
|
105
125
|
parameters:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
126
|
+
- in: path
|
|
127
|
+
name: id
|
|
128
|
+
type: integer
|
|
129
|
+
format: int32
|
|
130
|
+
required: true
|
|
111
131
|
responses:
|
|
112
|
-
|
|
132
|
+
'200':
|
|
113
133
|
description: Delete an artifact
|
|
114
134
|
schema:
|
|
115
135
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
116
|
-
|
|
136
|
+
'404':
|
|
117
137
|
description: Not found
|
|
118
138
|
schema:
|
|
119
139
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
120
140
|
tags:
|
|
121
|
-
|
|
141
|
+
- artifacts
|
|
122
142
|
get:
|
|
123
143
|
summary: Get an artifact
|
|
124
144
|
description: Get an artifact
|
|
125
145
|
produces:
|
|
126
|
-
|
|
146
|
+
- application/json
|
|
127
147
|
parameters:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
148
|
+
- in: path
|
|
149
|
+
name: id
|
|
150
|
+
type: integer
|
|
151
|
+
format: int32
|
|
152
|
+
required: true
|
|
133
153
|
responses:
|
|
134
|
-
|
|
154
|
+
'200':
|
|
135
155
|
description: Get an artifact
|
|
136
156
|
schema:
|
|
137
157
|
"$ref": "#/definitions/Mihari_Entities_Artifact"
|
|
138
|
-
|
|
158
|
+
'404':
|
|
139
159
|
description: Not found
|
|
140
160
|
schema:
|
|
141
161
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
142
162
|
tags:
|
|
143
|
-
|
|
163
|
+
- artifacts
|
|
144
164
|
"/api/artifacts/{id}/enrich":
|
|
145
165
|
get:
|
|
146
166
|
summary: Enrich an artifact
|
|
147
167
|
description: Enrich an artifact
|
|
148
168
|
produces:
|
|
149
|
-
|
|
169
|
+
- application/json
|
|
150
170
|
parameters:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
171
|
+
- in: path
|
|
172
|
+
name: id
|
|
173
|
+
type: integer
|
|
174
|
+
format: int32
|
|
175
|
+
required: true
|
|
156
176
|
responses:
|
|
157
|
-
|
|
177
|
+
'200':
|
|
158
178
|
description: Enrich an artifact
|
|
159
179
|
schema:
|
|
160
180
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
161
|
-
|
|
181
|
+
'404':
|
|
162
182
|
description: Not found
|
|
163
183
|
schema:
|
|
164
184
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
165
185
|
tags:
|
|
166
|
-
|
|
186
|
+
- artifacts
|
|
167
187
|
"/api/configs":
|
|
168
188
|
get:
|
|
169
189
|
summary: Get configs
|
|
170
190
|
description: Get configs
|
|
171
191
|
produces:
|
|
172
|
-
|
|
192
|
+
- application/json
|
|
173
193
|
responses:
|
|
174
|
-
|
|
194
|
+
'200':
|
|
175
195
|
description: Get configs
|
|
176
196
|
schema:
|
|
177
197
|
type: array
|
|
178
198
|
items:
|
|
179
199
|
"$ref": "#/definitions/Mihari_Entities_Config"
|
|
180
200
|
tags:
|
|
181
|
-
|
|
201
|
+
- configs
|
|
182
202
|
"/api/ip_addresses/{ip}":
|
|
183
203
|
get:
|
|
184
204
|
summary: Get an IP address
|
|
185
205
|
description: Get an IP address
|
|
186
206
|
produces:
|
|
187
|
-
|
|
207
|
+
- application/json
|
|
188
208
|
parameters:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
209
|
+
- in: path
|
|
210
|
+
name: ip
|
|
211
|
+
type: string
|
|
212
|
+
required: true
|
|
193
213
|
responses:
|
|
194
|
-
|
|
214
|
+
'200':
|
|
195
215
|
description: Get an IP address
|
|
196
216
|
schema:
|
|
197
217
|
"$ref": "#/definitions/Mihari_Entities_IPAddress"
|
|
198
|
-
|
|
218
|
+
'404':
|
|
199
219
|
description: Not found
|
|
200
220
|
schema:
|
|
201
221
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
202
222
|
tags:
|
|
203
|
-
|
|
223
|
+
- ip_addresses
|
|
204
224
|
"/api/rules/{id}":
|
|
205
225
|
delete:
|
|
206
226
|
summary: Delete a rule
|
|
207
227
|
description: Delete a rule
|
|
208
228
|
produces:
|
|
209
|
-
|
|
229
|
+
- application/json
|
|
210
230
|
parameters:
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
231
|
+
- in: path
|
|
232
|
+
name: id
|
|
233
|
+
type: string
|
|
234
|
+
required: true
|
|
215
235
|
responses:
|
|
216
|
-
|
|
236
|
+
'200':
|
|
217
237
|
description: Delete a rule
|
|
218
238
|
schema:
|
|
219
239
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
220
|
-
|
|
240
|
+
'404':
|
|
221
241
|
description: Not found
|
|
222
242
|
schema:
|
|
223
243
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
224
244
|
tags:
|
|
225
|
-
|
|
245
|
+
- rules
|
|
226
246
|
get:
|
|
227
247
|
summary: Get a rule
|
|
228
248
|
description: Get a rule
|
|
229
249
|
produces:
|
|
230
|
-
|
|
250
|
+
- application/json
|
|
231
251
|
parameters:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
252
|
+
- in: path
|
|
253
|
+
name: id
|
|
254
|
+
type: string
|
|
255
|
+
required: true
|
|
236
256
|
responses:
|
|
237
|
-
|
|
257
|
+
'200':
|
|
238
258
|
description: Get a rule
|
|
239
259
|
schema:
|
|
240
260
|
"$ref": "#/definitions/Mihari_Entities_Rule"
|
|
241
|
-
|
|
261
|
+
'404':
|
|
242
262
|
description: Not found
|
|
243
263
|
schema:
|
|
244
264
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
245
265
|
tags:
|
|
246
|
-
|
|
266
|
+
- rules
|
|
247
267
|
"/api/rules":
|
|
248
268
|
put:
|
|
249
269
|
summary: Update a rule
|
|
250
270
|
description: Update a rule
|
|
251
271
|
produces:
|
|
252
|
-
|
|
272
|
+
- application/json
|
|
253
273
|
consumes:
|
|
254
|
-
|
|
274
|
+
- application/json
|
|
255
275
|
parameters:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
276
|
+
- name: putApiRules
|
|
277
|
+
in: body
|
|
278
|
+
required: true
|
|
279
|
+
schema:
|
|
280
|
+
"$ref": "#/definitions/putApiRules"
|
|
261
281
|
responses:
|
|
262
|
-
|
|
282
|
+
'200':
|
|
263
283
|
description: Update a rule
|
|
264
284
|
schema:
|
|
265
285
|
"$ref": "#/definitions/Mihari_Entities_Rule"
|
|
266
286
|
tags:
|
|
267
|
-
|
|
287
|
+
- rules
|
|
268
288
|
post:
|
|
269
289
|
summary: Create a rule
|
|
270
290
|
description: Create a rule
|
|
271
291
|
produces:
|
|
272
|
-
|
|
292
|
+
- application/json
|
|
273
293
|
consumes:
|
|
274
|
-
|
|
294
|
+
- application/json
|
|
275
295
|
parameters:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
296
|
+
- name: postApiRules
|
|
297
|
+
in: body
|
|
298
|
+
required: true
|
|
299
|
+
schema:
|
|
300
|
+
"$ref": "#/definitions/postApiRules"
|
|
281
301
|
responses:
|
|
282
|
-
|
|
302
|
+
'201':
|
|
283
303
|
description: Create a rule
|
|
284
304
|
schema:
|
|
285
305
|
"$ref": "#/definitions/Mihari_Entities_Rule"
|
|
286
306
|
tags:
|
|
287
|
-
|
|
307
|
+
- rules
|
|
288
308
|
get:
|
|
289
309
|
summary: Search rules
|
|
290
310
|
description: Search rules
|
|
291
311
|
produces:
|
|
292
|
-
|
|
312
|
+
- application/json
|
|
293
313
|
parameters:
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
314
|
+
- in: query
|
|
315
|
+
name: page
|
|
316
|
+
type: integer
|
|
317
|
+
format: int32
|
|
318
|
+
default: 1
|
|
319
|
+
required: false
|
|
320
|
+
- in: query
|
|
321
|
+
name: limit
|
|
322
|
+
type: integer
|
|
323
|
+
format: int32
|
|
324
|
+
default: 10
|
|
325
|
+
required: false
|
|
326
|
+
- in: query
|
|
327
|
+
name: title
|
|
328
|
+
type: string
|
|
329
|
+
required: false
|
|
330
|
+
- in: query
|
|
331
|
+
name: description
|
|
332
|
+
type: string
|
|
333
|
+
required: false
|
|
334
|
+
- in: query
|
|
335
|
+
name: tag
|
|
336
|
+
type: string
|
|
337
|
+
required: false
|
|
338
|
+
- in: query
|
|
339
|
+
name: fromAt
|
|
340
|
+
type: string
|
|
341
|
+
format: date-time
|
|
342
|
+
required: false
|
|
343
|
+
- in: query
|
|
344
|
+
name: toAt
|
|
345
|
+
type: string
|
|
346
|
+
format: date-time
|
|
347
|
+
required: false
|
|
328
348
|
responses:
|
|
329
|
-
|
|
349
|
+
'200':
|
|
330
350
|
description: Search rules
|
|
331
351
|
schema:
|
|
332
352
|
type: array
|
|
333
353
|
items:
|
|
334
354
|
"$ref": "#/definitions/Mihari_Entities_RulesWithPagination"
|
|
335
|
-
|
|
355
|
+
'404':
|
|
336
356
|
description: Not found
|
|
337
357
|
schema:
|
|
338
358
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
339
359
|
tags:
|
|
340
|
-
|
|
360
|
+
- rules
|
|
341
361
|
"/api/rules/{id}/run":
|
|
342
362
|
get:
|
|
343
363
|
summary: Run a rule
|
|
344
364
|
description: Run a rule
|
|
345
365
|
produces:
|
|
346
|
-
|
|
366
|
+
- application/json
|
|
347
367
|
parameters:
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
368
|
+
- in: path
|
|
369
|
+
name: id
|
|
370
|
+
type: string
|
|
371
|
+
required: true
|
|
352
372
|
responses:
|
|
353
|
-
|
|
373
|
+
'200':
|
|
354
374
|
description: Run a rule
|
|
355
375
|
schema:
|
|
356
376
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
357
377
|
tags:
|
|
358
|
-
|
|
378
|
+
- rules
|
|
359
379
|
"/api/rules/ids":
|
|
360
380
|
get:
|
|
361
381
|
summary: Get rule IDs
|
|
362
382
|
description: Get Rule IDs
|
|
363
383
|
produces:
|
|
364
|
-
|
|
384
|
+
- application/json
|
|
365
385
|
responses:
|
|
366
|
-
|
|
386
|
+
'200':
|
|
367
387
|
description: Get Rule IDs
|
|
368
388
|
schema:
|
|
369
389
|
type: array
|
|
370
390
|
items:
|
|
371
391
|
"$ref": "#/definitions/Mihari_Entities_RuleIDs"
|
|
372
392
|
tags:
|
|
373
|
-
|
|
393
|
+
- rules
|
|
374
394
|
"/api/tags/{name}":
|
|
375
395
|
delete:
|
|
376
396
|
summary: Delete a tag
|
|
377
397
|
description: Delete a tag
|
|
378
398
|
produces:
|
|
379
|
-
|
|
399
|
+
- application/json
|
|
380
400
|
parameters:
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
401
|
+
- in: path
|
|
402
|
+
name: name
|
|
403
|
+
type: string
|
|
404
|
+
required: true
|
|
385
405
|
responses:
|
|
386
|
-
|
|
406
|
+
'200':
|
|
387
407
|
description: Delete a tag
|
|
388
408
|
schema:
|
|
389
409
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
390
|
-
|
|
410
|
+
'404':
|
|
391
411
|
description: Not found
|
|
392
412
|
schema:
|
|
393
413
|
"$ref": "#/definitions/Mihari_Entities_Message"
|
|
394
414
|
tags:
|
|
395
|
-
|
|
415
|
+
- tags
|
|
396
416
|
"/api/tags":
|
|
397
417
|
get:
|
|
398
418
|
summary: Get tags
|
|
399
419
|
description: Get tags
|
|
400
420
|
produces:
|
|
401
|
-
|
|
421
|
+
- application/json
|
|
402
422
|
responses:
|
|
403
|
-
|
|
423
|
+
'200':
|
|
404
424
|
description: Get tags
|
|
405
425
|
schema:
|
|
406
426
|
type: array
|
|
407
427
|
items:
|
|
408
428
|
"$ref": "#/definitions/Mihari_Entities_Tags"
|
|
409
429
|
tags:
|
|
410
|
-
|
|
430
|
+
- tags
|
|
411
431
|
definitions:
|
|
412
|
-
|
|
432
|
+
postApiAlerts:
|
|
413
433
|
type: object
|
|
414
434
|
properties:
|
|
415
|
-
|
|
435
|
+
ruleId:
|
|
416
436
|
type: string
|
|
417
|
-
|
|
418
|
-
- message
|
|
419
|
-
description: Mihari_Entities_Message model
|
|
420
|
-
Mihari_Entities_AlertsWithPagination:
|
|
421
|
-
type: object
|
|
422
|
-
properties:
|
|
423
|
-
alerts:
|
|
437
|
+
artifacts:
|
|
424
438
|
type: array
|
|
425
439
|
items:
|
|
426
|
-
|
|
427
|
-
total:
|
|
428
|
-
type: integer
|
|
429
|
-
format: int32
|
|
430
|
-
currentPage:
|
|
431
|
-
type: integer
|
|
432
|
-
format: int32
|
|
433
|
-
pageSize:
|
|
434
|
-
type: integer
|
|
435
|
-
format: int32
|
|
440
|
+
type: string
|
|
436
441
|
required:
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
- pageSize
|
|
441
|
-
description: Mihari_Entities_AlertsWithPagination model
|
|
442
|
+
- ruleId
|
|
443
|
+
- artifacts
|
|
444
|
+
description: Create an alert
|
|
442
445
|
Mihari_Entities_Alert:
|
|
443
446
|
type: object
|
|
444
447
|
properties:
|
|
@@ -459,10 +462,11 @@ definitions:
|
|
|
459
462
|
items:
|
|
460
463
|
"$ref": "#/definitions/Mihari_Entities_Tag"
|
|
461
464
|
required:
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
465
|
+
- id
|
|
466
|
+
- ruleId
|
|
467
|
+
- createdAt
|
|
468
|
+
- tags
|
|
469
|
+
description: Mihari_Entities_Alert model
|
|
466
470
|
Mihari_Entities_BaseArtifact:
|
|
467
471
|
type: object
|
|
468
472
|
properties:
|
|
@@ -480,17 +484,47 @@ definitions:
|
|
|
480
484
|
items:
|
|
481
485
|
type: string
|
|
482
486
|
required:
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
+
- id
|
|
488
|
+
- data
|
|
489
|
+
- dataType
|
|
490
|
+
- source
|
|
487
491
|
Mihari_Entities_Tag:
|
|
488
492
|
type: object
|
|
489
493
|
properties:
|
|
490
494
|
name:
|
|
491
495
|
type: string
|
|
492
496
|
required:
|
|
493
|
-
|
|
497
|
+
- name
|
|
498
|
+
Mihari_Entities_Message:
|
|
499
|
+
type: object
|
|
500
|
+
properties:
|
|
501
|
+
message:
|
|
502
|
+
type: string
|
|
503
|
+
required:
|
|
504
|
+
- message
|
|
505
|
+
description: Mihari_Entities_Message model
|
|
506
|
+
Mihari_Entities_AlertsWithPagination:
|
|
507
|
+
type: object
|
|
508
|
+
properties:
|
|
509
|
+
alerts:
|
|
510
|
+
type: array
|
|
511
|
+
items:
|
|
512
|
+
"$ref": "#/definitions/Mihari_Entities_Alert"
|
|
513
|
+
total:
|
|
514
|
+
type: integer
|
|
515
|
+
format: int32
|
|
516
|
+
currentPage:
|
|
517
|
+
type: integer
|
|
518
|
+
format: int32
|
|
519
|
+
pageSize:
|
|
520
|
+
type: integer
|
|
521
|
+
format: int32
|
|
522
|
+
required:
|
|
523
|
+
- alerts
|
|
524
|
+
- total
|
|
525
|
+
- currentPage
|
|
526
|
+
- pageSize
|
|
527
|
+
description: Mihari_Entities_AlertsWithPagination model
|
|
494
528
|
Mihari_Entities_Artifact:
|
|
495
529
|
type: object
|
|
496
530
|
properties:
|
|
@@ -532,10 +566,10 @@ definitions:
|
|
|
532
566
|
items:
|
|
533
567
|
"$ref": "#/definitions/Mihari_Entities_Port"
|
|
534
568
|
required:
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
569
|
+
- id
|
|
570
|
+
- data
|
|
571
|
+
- dataType
|
|
572
|
+
- source
|
|
539
573
|
description: Mihari_Entities_Artifact model
|
|
540
574
|
Mihari_Entities_AutonomousSystem:
|
|
541
575
|
type: object
|
|
@@ -544,7 +578,7 @@ definitions:
|
|
|
544
578
|
type: integer
|
|
545
579
|
format: int32
|
|
546
580
|
required:
|
|
547
|
-
|
|
581
|
+
- asn
|
|
548
582
|
Mihari_Entities_Geolocation:
|
|
549
583
|
type: object
|
|
550
584
|
properties:
|
|
@@ -553,8 +587,8 @@ definitions:
|
|
|
553
587
|
countryCode:
|
|
554
588
|
type: string
|
|
555
589
|
required:
|
|
556
|
-
|
|
557
|
-
|
|
590
|
+
- country
|
|
591
|
+
- countryCode
|
|
558
592
|
Mihari_Entities_WhoisRecord:
|
|
559
593
|
type: object
|
|
560
594
|
properties:
|
|
@@ -576,15 +610,15 @@ definitions:
|
|
|
576
610
|
items:
|
|
577
611
|
type: object
|
|
578
612
|
required:
|
|
579
|
-
|
|
580
|
-
|
|
613
|
+
- domain
|
|
614
|
+
- contacts
|
|
581
615
|
Mihari_Entities_ReverseDnsName:
|
|
582
616
|
type: object
|
|
583
617
|
properties:
|
|
584
618
|
name:
|
|
585
619
|
type: string
|
|
586
620
|
required:
|
|
587
|
-
|
|
621
|
+
- name
|
|
588
622
|
Mihari_Entities_DnsRecord:
|
|
589
623
|
type: object
|
|
590
624
|
properties:
|
|
@@ -593,15 +627,15 @@ definitions:
|
|
|
593
627
|
value:
|
|
594
628
|
type: string
|
|
595
629
|
required:
|
|
596
|
-
|
|
597
|
-
|
|
630
|
+
- resource
|
|
631
|
+
- value
|
|
598
632
|
Mihari_Entities_CPE:
|
|
599
633
|
type: object
|
|
600
634
|
properties:
|
|
601
635
|
cpe:
|
|
602
636
|
type: string
|
|
603
637
|
required:
|
|
604
|
-
|
|
638
|
+
- cpe
|
|
605
639
|
Mihari_Entities_Port:
|
|
606
640
|
type: object
|
|
607
641
|
properties:
|
|
@@ -609,7 +643,7 @@ definitions:
|
|
|
609
643
|
type: integer
|
|
610
644
|
format: int32
|
|
611
645
|
required:
|
|
612
|
-
|
|
646
|
+
- port
|
|
613
647
|
Mihari_Entities_Config:
|
|
614
648
|
type: object
|
|
615
649
|
properties:
|
|
@@ -624,10 +658,10 @@ definitions:
|
|
|
624
658
|
isConfigured:
|
|
625
659
|
type: boolean
|
|
626
660
|
required:
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
661
|
+
- name
|
|
662
|
+
- type
|
|
663
|
+
- values
|
|
664
|
+
- isConfigured
|
|
631
665
|
description: Mihari_Entities_Config model
|
|
632
666
|
Mihari_Entities_IPAddress:
|
|
633
667
|
type: object
|
|
@@ -644,9 +678,9 @@ definitions:
|
|
|
644
678
|
type: integer
|
|
645
679
|
format: int32
|
|
646
680
|
required:
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
681
|
+
- ip
|
|
682
|
+
- countryCode
|
|
683
|
+
- loc
|
|
650
684
|
description: Mihari_Entities_IPAddress model
|
|
651
685
|
putApiRules:
|
|
652
686
|
type: object
|
|
@@ -656,8 +690,8 @@ definitions:
|
|
|
656
690
|
yaml:
|
|
657
691
|
type: string
|
|
658
692
|
required:
|
|
659
|
-
|
|
660
|
-
|
|
693
|
+
- id
|
|
694
|
+
- yaml
|
|
661
695
|
description: Update a rule
|
|
662
696
|
Mihari_Entities_Rule:
|
|
663
697
|
type: object
|
|
@@ -681,13 +715,13 @@ definitions:
|
|
|
681
715
|
items:
|
|
682
716
|
"$ref": "#/definitions/Mihari_Entities_Tag"
|
|
683
717
|
required:
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
718
|
+
- id
|
|
719
|
+
- title
|
|
720
|
+
- description
|
|
721
|
+
- yaml
|
|
722
|
+
- createdAt
|
|
723
|
+
- updatedAt
|
|
724
|
+
- tags
|
|
691
725
|
description: Mihari_Entities_Rule model
|
|
692
726
|
postApiRules:
|
|
693
727
|
type: object
|
|
@@ -695,7 +729,7 @@ definitions:
|
|
|
695
729
|
yaml:
|
|
696
730
|
type: string
|
|
697
731
|
required:
|
|
698
|
-
|
|
732
|
+
- yaml
|
|
699
733
|
description: Create a rule
|
|
700
734
|
Mihari_Entities_RulesWithPagination:
|
|
701
735
|
type: object
|
|
@@ -714,10 +748,10 @@ definitions:
|
|
|
714
748
|
type: integer
|
|
715
749
|
format: int32
|
|
716
750
|
required:
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
751
|
+
- rules
|
|
752
|
+
- total
|
|
753
|
+
- currentPage
|
|
754
|
+
- pageSize
|
|
721
755
|
description: Mihari_Entities_RulesWithPagination model
|
|
722
756
|
Mihari_Entities_RuleIDs:
|
|
723
757
|
type: object
|
|
@@ -725,7 +759,7 @@ definitions:
|
|
|
725
759
|
ruleIds:
|
|
726
760
|
type: string
|
|
727
761
|
required:
|
|
728
|
-
|
|
762
|
+
- ruleIds
|
|
729
763
|
description: Mihari_Entities_RuleIDs model
|
|
730
764
|
Mihari_Entities_Tags:
|
|
731
765
|
type: object
|
|
@@ -733,5 +767,5 @@ definitions:
|
|
|
733
767
|
tags:
|
|
734
768
|
type: string
|
|
735
769
|
required:
|
|
736
|
-
|
|
770
|
+
- tags
|
|
737
771
|
description: Mihari_Entities_Tags model
|