https://github.com/crowdstrike/ansible_collection_falcon

Comprehensive toolkit for streamlining your interactions with the CrowdStrike Falcon platform.

https://github.com/crowdstrike/ansible_collection_falcon

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.9%) to scientific vocabulary

Keywords

ansible crowdstrike falcon linux mac security sensor windows

Keywords from Contributors

projection archival python313 python312 python311 python310 python39 scripts interactive operator
Last synced: 5 months ago · JSON representation

Repository

Comprehensive toolkit for streamlining your interactions with the CrowdStrike Falcon platform.

Basic Info
Statistics
  • Stars: 108
  • Watchers: 12
  • Forks: 64
  • Open Issues: 10
  • Releases: 73
Topics
ansible crowdstrike falcon linux mac security sensor windows
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Support

README.md

Ansible Collection Version

CrowdStrike Falcon Collection

The CrowdStrike Falcon Ansible Collection serves as a comprehensive toolkit for streamlining your interactions with the CrowdStrike Falcon platform.

Description

This collection streamlines the management of CrowdStrike Falcon deployments by offering pre-defined roles, modules, inventory plugins, and lookup plugins. It enables automated installation, configuration, and removal of the Falcon sensor across multiple platforms including macOS, Linux, and Windows. The collection also provides robust API integration capabilities through the CrowdStrike FalconPy SDK.

Requirements

Ansible version compatibility

Tested with the Ansible Core >= 2.15.0 versions, and the current development version of Ansible. Ansible Core versions before 2.15.0 are not supported.

Python version compatibility

This collection is reliant on the CrowdStrike FalconPy SDK for its Python interface. In line with the Python versions supported by FalconPy, a minimum Python version of 3.7 is required for this collection to function properly.

[!NOTE] As of FalconPy Version 1.4.0, Python 3.6 is no longer supported. If you would like to use FalconPy with Python 3.6, please use FalconPy Version < 1.4.0.

Included content

Roles

Offering pre-defined roles tailored for various platforms—including macOS, Linux, and Windows—this collection simplifies the installation, configuration, and removal processes for CrowdStrike's Falcon sensor.

Privilege Escalation Requirements

When using this collection, it's essential to understand how privilege escalation works. While our roles use privilege escalation internally, you must ensure that it is configured on the target hosts.

[!IMPORTANT] Do not set become: true for the roles. Instead, make sure that the target hosts have privilege escalation (sudo/runas) configured and available. This will allow our roles to use privilege escalation internally.

Please read each role's README to familiarize yourself with the role variables and other requirements.

| Role Name | Documentation | --------- | :-----------: | crowdstrike.falcon.falconinstall | README | crowdstrike.falcon.falconconfigure | README | crowdstrike.falcon.falcon_uninstall | README

Modules

Name | Description --- | --- crowdstrike.falcon.falconctl|Configure CrowdStrike Falcon Sensor (Linux) crowdstrike.falcon.falconctl_info|Get Values Associated with Falcon Sensor (Linux) crowdstrike.falcon.fctlchildcid_info|Retrieve details about Flight Control child CIDs crowdstrike.falcon.auth|Manage Authentication with Falcon API crowdstrike.falcon.cid_info|Get CID with checksum crowdstrike.falcon.host_contain|Network contain hosts in Falcon crowdstrike.falcon.host_hide|Hide/Unhide hosts from the Falcon console. Preference should be given to using Host Retention Policies under Host Management in the Falcon console which provides more flexibility and customization for automatically hiding and deleting hosts instead. crowdstrike.falcon.host_info|Get information about Falcon hosts crowdstrike.falcon.intelruledownload|Download CrowdStrike Falcon Intel rule files crowdstrike.falcon.intelruleinfo|Get information about CrowdStrike Falcon Intel rules crowdstrike.falcon.kernelsupportinfo|Get information about kernels supported by the Falcon Sensor for Linux crowdstrike.falcon.sensor_download|Download Falcon Sensor Installer crowdstrike.falcon.sensordownloadinfo|Get information about Falcon Sensor Installers crowdstrike.falcon.sensorupdatebuilds_info|Get a list of available sensor build versions crowdstrike.falcon.sensorupdatepolicy_info|Get information about Falcon Update Sensor Policies

Inventory plugins

Name | Description --- | --- crowdstrike.falcon.falcon_discover|Falcon Discover inventory source crowdstrike.falcon.falcon_hosts|Falcon Hosts inventory source

Lookup plugins

Name | Description --- | --- crowdstrike.falcon.fctlchildcids|Fetch Flight Control child CIDs crowdstrike.falcon.host_ids|Fetch host IDs in Falcon crowdstrike.falcon.maintenance_token|Fetch maintenance token <!--end collection content-->

Event sources

Ansible EDA (Event Driven Ansible) is a new way to connect to sources of events and act on those events using rulebooks. For more information, see the EDA documentation.

Name | Description --- | --- crowdstrike.falcon.eventstream | Receive events from CrowdStrike Falcon Event Stream.

Installation

Installing the Collection from Ansible Galaxy

Before using this collection, you need to install it with the Ansible Galaxy command-line tool:

terminal ansible-galaxy collection install crowdstrike.falcon

You can also include the collection in a requirements.yml file and install it through ansible-galaxy, use the following format:

```yaml

collections: - crowdstrike.falcon ```

Then run:

terminal ansible-galaxy collection install -r requirements.yml

Additional notes

  • Upgrading the Collection: Note that if you've installed the collection from Ansible Galaxy, it won't automatically update when you upgrade the ansible package. To manually upgrade to the latest version, use:

    terminal ansible-galaxy collection install crowdstrike.falcon --upgrade

  • Installing a Specific Version: If you need to install a particular version of the collection (for example, to downgrade due to an issue), you can specify the version as follows:

    terminal ansible-galaxy collection install crowdstrike.falcon:==0.1.0

  • See using Ansible collections for more details.

Required Python dependencies

The Python module dependencies are not automatically handled by ansible-galaxy. To install these dependencies, you have the following options:

  1. Install the CrowdStrike FalconPy package directly:

    terminal pip install crowdstrike-falconpy aiohttp

  2. Alternatively, if you clone the repository, you can utilize the requirements.txt file to install all required packages:

    terminal pip install -r requirements.txt

Authentication

To use this Ansible collection effectively, you'll need to authenticate with the CrowdStrike Falcon API. We've prepared a detailed guide outlining the various authentication mechanisms supported. Check out the Authentication Guide for step-by-step instructions.

Use Cases

Using the Built-In Roles

Install and configure the CrowdStrike Falcon Sensor at version N-2:

```yaml - hosts: all vars: falconclientid: falconclientsecret: roles: - role: crowdstrike.falcon.falconinstall vars: falconsensorversiondecrement: 2

  • role: crowdstrike.falcon.falconconfigure vars: # falconcid is autodetected using falconclientid|secret vars falcon_tags: 'falcon,example,tags' ```

Install the latest sensor and prepare golden image:

```yaml - hosts: target-host vars: falconclientid: falconclientsecret: roles: - role: crowdstrike.falcon.falcon_install

  • role: crowdstrike.falcon.falconconfigure vars: falconremove_aid: yes ```

Using Modules and Plugins

```yaml

  • name: Get a list of the 2 latest Windows Sensor Installers crowdstrike.falcon.sensordownloadinfo: clientid: <FALCONCLIENTID> clientsecret: cloud: us-2 limit: 2 filter: "platformname:'windows'" sort: "version|desc" delegateto: localhost

  • name: Get information about all Windows hosts (using hostids lookup) crowdstrike.falcon.hostinfo: hosts: "{{ lookup('crowdstrike.falcon.hostids', windowshostfilter) }}" vars: windowshostfilter: 'platformname:"Windows"' ```

Using Dynamic Inventories

Get detailed information for all Linux hosts in reduced functionality mode:

```yaml

sample file: linuxrfm.falconhosts.yml

plugin: crowdstrike.falcon.falconhosts filter: "platformname:'Linux' + reducedfunctionalitymode:'yes'" ```

Discover systems in your environment that don't have Falcon installed in the past day:

```yaml

sample file: sketchyhosts.falcondiscover.yml

plugin: crowdstrike.falcon.falcondiscover filter: "entitytype:'unmanaged'+firstseentimestamp:>'now-1d'" ```

React to Security Events with the EDA Event Source

This example requires Ansible EDA to be installed. See the Ansible Rulebook documentation for more information.

shell ansible-rulebook -i inventory -r crowdstrike.falcon.event_stream_example -E FALCON_CLIENT_ID,FALCON_CLIENT_SECRET

Testing

Ansible Lint Ansible Test YAML Lint Python Lint

The CrowdStrike Falcon Ansible collection uses automated testing through Molecule integrated with GitHub Actions. Tests are executed automatically every night, ensuring continuous validation of:

  • All built-in roles and their functionality
  • Multiple deployment scenarios
  • Compatibility across supported operating systems

This automated testing pipeline helps maintain collection reliability and quickly identifies potential issues across different environments and use cases.

To learn more about how we use Molecule, check out the molecule directory.

Nightly Results: Actions

Contributing

If you want to develop new content or improve on this collection, please open an issue or create a pull request. All contributions are welcome!

As of release > 3.2.18, we will now be following Ansible's development patterns for implementing Ansible's changelog fragments. This will require a changelog fragment to any PR that is not documentation or trivial. Most changelog entries will likely be bugfixes or minor_changes. Please refer to the documentation for Ansible's changelog fragments to learn more.

Support

CrowdStrike Ansible Collection is a community-driven, open source project aimed at simplifying the integration and utilization of CrowdStrike's Falcon platform with Ansible automation. While not an official CrowdStrike product, the CrowdStrike Ansible Collection is maintained by CrowdStrike and supported in collaboration with the open source developer community.

For additional information, please refer to the SUPPORT.md file.

Release Notes

See the CHANGELOG.rst for a history of notable changes to this collection.

Related information

License Information

See the LICENSE for more information.

Owner

  • Name: CrowdStrike
  • Login: CrowdStrike
  • Kind: organization
  • Email: github@crowdstrike.com
  • Location: United States of America

GitHub Events

Total
  • Create event: 23
  • Release event: 6
  • Issues event: 23
  • Watch event: 9
  • Delete event: 14
  • Issue comment event: 43
  • Push event: 54
  • Pull request review comment event: 9
  • Pull request review event: 32
  • Pull request event: 58
  • Fork event: 5
Last Year
  • Create event: 23
  • Release event: 6
  • Issues event: 23
  • Watch event: 9
  • Delete event: 14
  • Issue comment event: 43
  • Push event: 54
  • Pull request review comment event: 9
  • Pull request review event: 32
  • Pull request event: 58
  • Fork event: 5

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 541
  • Total Committers: 25
  • Avg Commits per committer: 21.64
  • Development Distribution Score (DDS): 0.305
Past Year
  • Commits: 57
  • Committers: 6
  • Avg Commits per committer: 9.5
  • Development Distribution Score (DDS): 0.228
Top Committers
Name Email Commits
Carlos Matos c****s@c****m 376
Gabe Alford r****s@g****m 93
dependabot[bot] 4****] 21
Shawn Wells s****n@s****o 20
ironbishop f****e@n****m 4
ffalor 3****r 3
grumpy-penguin 6****n 3
Gianluca Salvo g****o@g****t 2
thecasual w****4@g****m 2
Larry 3****s 2
Abhijeet Kasurde a****e@r****m 1
Chip Selden c****n@g****m 1
Florian Ritterhoff 3****f 1
Gianluca Salvo G****u 1
Jake Jackson j****3@g****m 1
John Losito l****j@g****m 1
Jordan Pisaniello j****o@p****e 1
Nicholas Hinds h****n@g****m 1
Taras 9****1 1
itsmehary H****y 1
juju4 j****4 1
quasd q****d 1
unknowvwake v****w@g****m 1
Nate Ledet n****t@g****m 1
US Thakur u****r@6****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 33
  • Total pull requests: 76
  • Average time to close issues: 30 days
  • Average time to close pull requests: 6 days
  • Total issue authors: 17
  • Total pull request authors: 7
  • Average comments per issue: 2.52
  • Average comments per pull request: 0.18
  • Merged pull requests: 70
  • Bot issues: 0
  • Bot pull requests: 17
Past Year
  • Issues: 15
  • Pull requests: 52
  • Average time to close issues: 20 days
  • Average time to close pull requests: 8 days
  • Issue authors: 11
  • Pull request authors: 7
  • Average comments per issue: 1.87
  • Average comments per pull request: 0.23
  • Merged pull requests: 46
  • Bot issues: 0
  • Bot pull requests: 13
Top Authors
Issue Authors
  • carlosmmatos (27)
  • evanstoner (4)
  • kkeane (4)
  • TinLe (2)
  • kenadyinampudi (2)
  • TyraelTLK (2)
  • nhinds (2)
  • dhoppe (2)
  • fgerodez (1)
  • vikas-falconx (1)
  • FriedCircuits (1)
  • ai-ryanbess (1)
  • ongyo-sensei (1)
  • samccann (1)
  • vkeyur (1)
Pull Request Authors
  • carlosmmatos (112)
  • dependabot[bot] (29)
  • redhatrises (5)
  • Gianlu (2)
  • chipselden (2)
  • nhinds (2)
  • mikaaalto (1)
  • unknowvwake (1)
  • rsdoherty (1)
  • quasd (1)
  • Akasurde (1)
  • dhoppe (1)
  • UDilhan (1)
Top Labels
Issue Labels
question (16) minor_changes (13) enhancement (9) devel (9) documentation (7) bug (6) bugfixes (5) new_release (3) eda (2) linting (2) feature_request (1) ci/cd (1)
Pull Request Labels
bugfixes (39) dependencies (32) minor_changes (29) new_release (22) ok-to-test (20) documentation (19) ci/cd (17) enhancement (14) devel (12) github_actions (5) eda (4) molecule (4) linting (3) inventory (2) wontfix (1) feature_request (1) bug (1)

Dependencies

.github/workflows/ansible-lint.yml actions
  • actions/checkout v3 composite
  • ansible/ansible-lint-action main composite
.github/workflows/ansible-test.yml actions
  • actions/checkout v3 composite
  • ansible-community/ansible-test-gh-action release/v1 composite
.github/workflows/falcon_configure.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • nick-fields/retry v2 composite
.github/workflows/falcon_install.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • nick-fields/retry v2 composite
.github/workflows/falcon_uninstall.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • nick-fields/retry v2 composite
.github/workflows/linting.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/pages.yml actions
  • actions/checkout v3 composite
  • ad-m/github-push-action master composite
  • addnab/docker-run-action v3 composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/win_falcon_configure.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • nick-fields/retry v2 composite
.github/workflows/win_falcon_install.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • nick-fields/retry v2 composite
.github/workflows/win_falcon_uninstall.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • nick-fields/retry v2 composite
.github/workflows/yamllint.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • ibiqlik/action-yamllint v3 composite
.devcontainer/Dockerfile docker
  • willhallonline/ansible 2.12.2-ubuntu-20.04 build
.devcontainer/requirements.txt pypi
  • ansible * development
  • ansible-lint * development
  • autopep8 * development
  • flake8 * development
  • molecule * development
  • molecule-vagrant * development
  • pre-commit * development
  • pylint * development
  • python-vagrant * development
  • yamllint * development
.github/workflows/aap-refresh.yml actions
requirements.txt pypi
  • aiohttp ==3.8.5
  • crowdstrike-falconpy ==1.3.0