mirror of https://github.com/MISP/MISP
chg: [event restsearch] exposed includeGranularCorrelations
- and also made it visible in the JSON outputfeature/workflow-module/publish-event
parent
b6386674c4
commit
a3c728674f
|
@ -119,7 +119,8 @@ class RestSearchComponent extends Component
|
|||
'noEventReports',
|
||||
'noShadowAttributes',
|
||||
'order',
|
||||
'protected'
|
||||
'protected',
|
||||
'includeGranularCorrelations'
|
||||
],
|
||||
'Object' => [
|
||||
'returnFormat',
|
||||
|
|
|
@ -79,11 +79,31 @@ class JSONConverterTool
|
|||
}
|
||||
if (isset($event['Event']['Attribute'])) {
|
||||
$event['Event']['Attribute'] = self::__cleanAttributes($event['Event']['Attribute'], $tempSightings);
|
||||
if (!empty($event['Event']['RelatedAttribute'])) {
|
||||
foreach ($event['Event']['Attribute'] as $k => $attribute) {
|
||||
if (isset($event['Event']['RelatedAttribute'][$attribute['id']])) {
|
||||
foreach($event['Event']['RelatedAttribute'][$attribute['id']] as $correlation) {
|
||||
$event['Event']['Attribute'][$k]['RelatedAttribute'][] = [
|
||||
'id' => $correlation['attribute_id'],
|
||||
'value' => $correlation['value'],
|
||||
'org_id' => $correlation['org_id'],
|
||||
'info' => $correlation['info'],
|
||||
'event_id' => $correlation['id']
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($event['Event']['Object'])) {
|
||||
$event['Event']['Object'] = self::__cleanObjects($event['Event']['Object'], $tempSightings);
|
||||
}
|
||||
unset($tempSightings);
|
||||
if (!empty($event['Event']['RelatedAttribute'])) {
|
||||
foreach ($event['Event']['RelatedAttribute'] as $attribute_id => $relatedAttribute) {
|
||||
|
||||
}
|
||||
}
|
||||
unset($event['Event']['RelatedAttribute']);
|
||||
|
||||
// Remove information about user_id from JSON export
|
||||
|
|
|
@ -178,6 +178,7 @@ class Event extends AppModel
|
|||
'includeFeedCorrelations',
|
||||
'includeServerCorrelations',
|
||||
'includeWarninglistHits',
|
||||
'includeGranularCorrelations',
|
||||
'noEventReports', // do not include event report in event data
|
||||
'noShadowAttributes', // do not fetch proposals,
|
||||
'limit',
|
||||
|
|
Loading…
Reference in New Issue