(self, indicator, event, neighbors)
Anotate an event with data from indicators and neighbors.

        Tags with skull emoji, adds a comment to the event.
Anotate an event with data from indicators and neighbors.
Anotate an event with data from indicators and neighbors .
def mark_event(self, indicator, event, neighbors):
        """Anotate an event with data from indicators and neighbors.

        Tags with skull emoji, adds a comment to the event.
        """
        event.add_emojis([emojis.get_emoji('SKULL')])
        tags = []
        for n in neighbors:
            slug = re.sub(r'[^a-z0-9]', '-', n['name'].lower())
            slug = re.sub(r'-+', '-', slug)
            tags.append(slug)
        event.add_tags(tags)
        event.commit()

        msg = 'Indicator match: "{0:s}" ({1:s})\n'.format(
            indicator['name'], indicator['id'])
        msg += 'Related entities: {0!s}'.format(
            [n['name'] for n in neighbors])
        event.add_comment(msg)
        event.commit()
def mark_event ( self , indicator , event , neighbors ) : event . add_emojis ( [ emojis . get_emoji ( 'SKULL' ) ] ) tags = [ ] for n in neighbors : slug = re . sub ( r'[^a-z0-9]' , '-' , n [ 'name' ] . lower ( ) ) slug = re . sub ( r'-+' , '-' , slug ) tags . append ( slug ) event . add_tags ( tags ) event . commit ( ) msg = 'Indicator match: "{0:s}" ({1:s})\n' . format ( indicator [ 'name' ] , indicator [ 'id' ] ) msg += 'Related entities: {0!s}' . format ( [ n [ 'name' ] for n in neighbors ] ) event . add_comment ( msg ) event . commit ( )