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

assigned_to_user_id

string

The user ID (the email address) of the user to assign the alerts to.

This is compared with the assigned_to_uid key of an alert.

An empty string unassigns the alerts.

Mutually exclusive with assigned_to_uuid.

assigned_to_uuid

string

The UUID of the user to assign the alerts to.

An empty string unassigns the alerts.

Mutually exclusive with assigned_to_user_id.

auth

dictionary

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.

access_token

string

The OAuth2 access token to use for authentication.

cloud

string

The CrowdStrike cloud region to use.

This can differ from the module’s cloud argument due to autodiscovery.

client_id

aliases: falcon_client_id

string

The CrowdStrike API client ID to use.

See the Falcon documentation for more information about API clients.

The FALCON_CLIENT_ID environment variable can also be used.

client_secret

aliases: falcon_client_secret

string

The CrowdStrike API secret that corresponds to the client ID.

See the Falcon documentation for more information about API clients.

The FALCON_CLIENT_SECRET environment variable can also be used.

cloud

string

The CrowdStrike cloud region to use.

All clouds are automatically discovered if not specified, except for the us-gov-1 cloud.

The FALCON_CLOUD environment variable can also be used.

Choices:

  • "us-1" ← (default)

  • "us-2"

  • "us-3"

  • "us-gov-1"

  • "us-gov-2"

  • "eu-1"

comment

string

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.

composite_ids

list / elements=string / required

The composite IDs of the alerts to update, in the form <cid>:<product>:<...>. This is the composite_id key of an alert, not its id key.

A repeated ID is used once.

An empty list changes nothing.

ext_headers

dictionary

Extended headers that are prepended to the default headers dictionary.

member_cid

string

The CrowdStrike member CID for MSSP authentication.

See the Falcon documentation for more information about API clients.

The FALCON_MEMBER_CID environment variable can also be used.

purge_tags

boolean

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:

  • false ← (default)

  • true

resolution

string

The resolution of the alerts.

The API stores the resolution as the tag of the same name, so the resolution is also in the tags of the alert.

An alert has one resolution at a time. A new resolution replaces the one that the alert has.

none removes the resolution of the alert.

Choices:

  • "true_positive"

  • "false_positive"

  • "ignored"

  • "none"

show_in_ui

boolean

Whether the alerts are shown in the Falcon console.

Choices:

  • false

  • true

status

string

The status of the alerts.

Choices:

  • "new"

  • "in_progress"

  • "reopened"

  • "closed"

tags

list / elements=string

The tags that the alerts must have.

Tags are case-sensitive.

The values true_positive, false_positive and ignored are resolutions. Use resolution to set them.

user_agent

string

Custom User-Agent string to use for requests to the API.

The user agent string is prepended to the default user agent string (crowdstrike-ansible/<version>).

See RFC 7231 for more information.

The FALCON_USER_AGENT environment variable can also be used.

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped.

diff_mode

Support: full

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode

platform

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

alerts

list / elements=dictionary

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 before and after dicts keyed by composite ID, with the compared keys only.

Returned: success

assigned_to_name

string

The name of the user that the alert is assigned to.

Returned: when the alert is assigned

Sample: "Example User"

assigned_to_uid

string

The user ID of the user that the alert is assigned to.

Returned: when the alert is assigned

Sample: "user@example.com"

assigned_to_uuid

string

The UUID of the user that the alert is assigned to.

Returned: when the alert is assigned

Sample: "12345678-90ab-cdef-1234-567890abcdef"

comments

list / elements=dictionary

The comments of the alert.

Returned: when the alert has a comment

falcon_user_id

string

The ID of the user or API client that added the comment.

Returned: success

Sample: "12345678-90ab-cdef-1234-567890abcdef"

timestamp

string

The time when the comment was added.

Returned: success

Sample: "2026-01-01T00:00:00.000000000Z"

value

string

The text of the comment.

Returned: success

Sample: "Known admin tool, closed after review"

composite_id

string

The composite ID of the alert.

Returned: success

Sample: "1234567890abcdef1234567890abcdef:ind:abcdef1234567890abcdef1234567890:1234567890123456789-10304-123456789"

resolution

string

The resolution of the alert.

Returned: when the alert has a resolution tag

Sample: "false_positive"

show_in_ui

boolean

Whether the alert is shown in the Falcon console.

Returned: success

Sample: true

status

string

The status of the alert.

Returned: success

Sample: "closed"

tags

list / elements=string

The tags of the alert, with the resolution tag.

Returned: when the alert has tags

Sample: ["false_positive", "triage"]

updated_timestamp

string

The time when the alert was last changed.

Returned: success

Sample: "2026-01-01T00:00:00.000000000Z"

Authors

  • Carlos Matos (@carlosmmatos)