File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
misp_stix_converter/stix2misp/converters Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -506,7 +506,7 @@ def _parse_email_message_observable_object(
506506
507507 def _parse_ip_addresses_belonging_to_AS (
508508 self , AS_id : str , indicator_ref : str | tuple ) -> Iterator [dict ]:
509- for content in self .main_parser ._observable .values ():
509+ for observable_id , content in self .main_parser ._observable .items ():
510510 observable = content ['observable' ]
511511 if observable .type not in ('ipv4-addr' , 'ipv6-addr' ):
512512 continue
@@ -520,9 +520,14 @@ def _parse_ip_addresses_belonging_to_AS(
520520 ** self ._mapping .subnet_announced_attribute ()
521521 }
522522 if to_ids :
523- object_id = f"{ ' - ' .join (indicator_id )} - { object_id } "
523+ object_id = f"{ ' - ' .join (indicator_id )} - { observable_id } "
524+ attribute ['uuid' ] = self .main_parser ._create_v5_uuid (
525+ f'{ object_id } - subnet-announced - { observable .value } '
526+ )
527+ yield attribute
528+ continue
524529 attribute ['uuid' ] = self .main_parser ._create_v5_uuid (
525- f'{ object_id } - subnet-announced - { observable .value } '
530+ f'{ observable_id } - subnet-announced - { observable .value } '
526531 )
527532 yield attribute
528533
You can’t perform that action at this time.
0 commit comments