Skip to content

Return Extended Properties for sentinel alerts #782

@BWC-TomW

Description

@BWC-TomW

Is your feature request related to a problem? Please describe.

I would like a way to pull more details from the sentinel incident alerts so that I can process the query results.

currently when retrieving incidents you can specify alerts=True however the data returned here is currently heavily limited.

def get_incident_alerts(self, incident: str) -> list:

We have a use case that is currently not using msticpy that retrieves the associated events for a given alert by extracting the query and timeframe from the extended properties. This is currently how it's functioning.

def _get_alert_events(self, alert, limit=None):
    # type: (dict) -> list
    """
    Get event list for alert
    @param alert: Alert
    @param limit {int}: Limit for results
    @return: List of Events
    """
    extended_properties = json.loads(alert.get('ExtendedProperties'))
    start_time = convert_string_to_datetime(extended_properties.get('Query Start Time UTC'), "UTC")\
        .strftime(TIME_FORMAT)
    end_time = convert_string_to_datetime(extended_properties.get('Query End Time UTC'), "UTC")\
        .strftime(TIME_FORMAT)

    query = extended_properties.get('Query')
    timespan = '{}/{}'.format(start_time, end_time)

Describe the solution you'd like

Either a new method for retrieval of alert details for a given alert id or expand the param alerts=True on get_incident to return the entire alert object.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions