crowdstrike.falcon.alert module – Update Falcon alerts
Note
This module is part of the crowdstrike.falcon collection (version 4.15.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install crowdstrike.falcon.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: crowdstrike.falcon.alert.
New in crowdstrike.falcon 4.15.0
Synopsis
Update the status, resolution, tags, assignee, visibility and comments of existing Falcon alerts.
Alerts cannot be created or deleted with the API, so this module has no state option.
The module reads the alerts first and changes only the values that are different. A second run with the same options makes no change.
When one of the composite IDs does not exist, the module fails before it changes any alert.
Requirements
The below requirements are needed on the host that executes this module.
Alerts [READ, WRITE] API scope
crowdstrike-falconpy >= 1.5.0
python >= 3.12
Parameters
Parameter |
Comments |
|---|---|
The user ID (the email address) of the user to assign the alerts to. This is compared with the An empty string unassigns the alerts. Mutually exclusive with assigned_to_uuid. |
|
The UUID of the user to assign the alerts to. An empty string unassigns the alerts. Mutually exclusive with assigned_to_user_id. |
|
The registered result of the crowdstrike.falcon.auth module, or a dictionary containing the access_token and cloud keys. If provided, the client_id, client_secret, member_cid, and cloud options are ignored. Useful when needing to make multiple API calls to avoid rate limiting issues. |
|
The OAuth2 access token to use for authentication. |
|
The CrowdStrike cloud region to use. This can differ from the module’s cloud argument due to autodiscovery. |
|
The CrowdStrike API client ID to use. See the Falcon documentation for more information about API clients. The |
|
The CrowdStrike API secret that corresponds to the client ID. See the Falcon documentation for more information about API clients. The |
|
The CrowdStrike cloud region to use. All clouds are automatically discovered if not specified, except for the The Choices:
|
|
A comment to add to the alerts. The comment is added only to the alerts that have no comment with exactly this text, so a second run adds no comment. Comments cannot be changed or removed. |
|
The composite IDs of the alerts to update, in the form A repeated ID is used once. An empty list changes nothing. |
|
Extended headers that are prepended to the default headers dictionary. |
|
The CrowdStrike member CID for MSSP authentication. See the Falcon documentation for more information about API clients. The |
|
Remove the tags of the alerts that are not in tags. The resolution tag of an alert is never removed. Use resolution=none to remove it. Requires tags. Choices:
|
|
The resolution of the alerts. The API stores the resolution as the tag of the same name, so the resolution is also in the An alert has one resolution at a time. A new resolution replaces the one that the alert has.
Choices:
|
|
Whether the alerts are shown in the Falcon console. Choices:
|
|
The status of the alerts. Choices:
|
|
The tags that the alerts must have. Tags are case-sensitive. The values |
|
Custom User-Agent string to use for requests to the API. The user agent string is prepended to the default user agent string ( See RFC 7231 for more information. The |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped. |
|
Support: full |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
|
Platforms: all |
Target OS/families that can be operated against |
Notes
Note
At least one of status, resolution, tags, assigned_to_uuid, assigned_to_user_id, show_in_ui or comment is required.
See Also
See also
- crowdstrike.falcon.alert_info
Get information about Falcon alerts.
- Alerts API reference
The CrowdStrike API operations that this module uses.
Examples
- name: Close an alert as a false positive with a comment
crowdstrike.falcon.alert:
composite_ids:
- "1234567890abcdef1234567890abcdef:ind:abcdef1234567890abcdef1234567890:1234567890123456789-10304-123456789"
status: closed
resolution: false_positive
comment: "Known admin tool, closed after review"
- name: Set alerts in progress and assign them by user ID
crowdstrike.falcon.alert:
composite_ids:
- "1234567890abcdef1234567890abcdef:ind:abcdef1234567890abcdef1234567890:1234567890123456789-10304-123456789"
- "1234567890abcdef1234567890abcdef:ind:abcdef1234567890abcdef1234567890:1234567890123456789-10304-987654321"
status: in_progress
assigned_to_user_id: "user@example.com"
- name: Add tags to an alert
crowdstrike.falcon.alert:
composite_ids:
- "1234567890abcdef1234567890abcdef:ind:abcdef1234567890abcdef1234567890:1234567890123456789-10304-123456789"
tags:
- triage
- team-a
- name: Unassign an alert
crowdstrike.falcon.alert:
composite_ids:
- "1234567890abcdef1234567890abcdef:ind:abcdef1234567890abcdef1234567890:1234567890123456789-10304-123456789"
assigned_to_uuid: ""
- name: Find the new low severity alerts
crowdstrike.falcon.alert_info:
filter: "status:'new'+severity:<30"
register: low_alerts
- name: Close the alerts that were found
crowdstrike.falcon.alert:
composite_ids: "{{ low_alerts.alerts | map(attribute='composite_id') | list }}"
status: closed
resolution: ignored
- name: Hide an alert in the Falcon console
crowdstrike.falcon.alert:
composite_ids:
- "1234567890abcdef1234567890abcdef:ind:abcdef1234567890abcdef1234567890:1234567890123456789-10304-123456789"
show_in_ui: false
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The alerts, in the order of composite_ids. After a change, the alerts are read again from the API. In check mode and when nothing changed, these are the alerts as read before. Each alert has all the keys that crowdstrike.falcon.alert_info returns. The keys that this module compares are listed here. With diff mode, the diff has Returned: success |
|
The name of the user that the alert is assigned to. Returned: when the alert is assigned Sample: |
|
The user ID of the user that the alert is assigned to. Returned: when the alert is assigned Sample: |
|
The UUID of the user that the alert is assigned to. Returned: when the alert is assigned Sample: |
|
The comments of the alert. Returned: when the alert has a comment |
|
The ID of the user or API client that added the comment. Returned: success Sample: |
|
The time when the comment was added. Returned: success Sample: |
|
The text of the comment. Returned: success Sample: |
|
The composite ID of the alert. Returned: success Sample: |
|
The resolution of the alert. Returned: when the alert has a resolution tag Sample: |
|
Whether the alert is shown in the Falcon console. Returned: success Sample: |
|
The status of the alert. Returned: success Sample: |
|
The tags of the alert, with the resolution tag. Returned: when the alert has tags Sample: |
|
The time when the alert was last changed. Returned: success Sample: |