Skip to content

CrowdStrike/foundry-sample-functions-python

Repository files navigation

CrowdStrike Falcon

Functions with Python sample Foundry app

The Functions with Python sample Foundry app is a community-driven, open source project which serves as an example of an app which can be built using CrowdStrike's Foundry ecosystem. foundry-sample-functions-python is an open source project, not a CrowdStrike product. As such, it carries no formal support, expressed or implied.

This app is one of several App Templates included in Foundry that you can use to jumpstart your development. It comes complete with a set of preconfigured capabilities aligned to its business purpose. Deploy this app from the Templates page with a single click in the Foundry UI, create an app from this template using the Foundry CLI, or download it as a zip and import it.

Important

To view documentation and deploy this sample app, you need access to the Falcon console.

Description

The Functions with Python sample Foundry app shows how to use Python functions with FalconPy, workflows, API integrations, collections, and UI extensions.

Prerequisites

  • The Foundry CLI (instructions below).
  • Python 3.13+ (needed if running the app's functions locally). See Python For Beginners for installation instructions.

Install the Foundry CLI

You can install the Foundry CLI with Scoop on Windows or Homebrew on Linux/macOS.

Windows:

Install Scoop. Then, add the Foundry CLI bucket and install the Foundry CLI.

scoop bucket add foundry https://github.com/crowdstrike/scoop-foundry-cli.git
scoop install foundry

Or, you can download the latest Windows zip file, expand it, and add the install directory to your PATH environment variable.

Linux and macOS:

Install Homebrew. Then, add the Foundry CLI repository to the list of formulae that Homebrew uses and install the CLI:

brew tap crowdstrike/foundry-cli
brew install crowdstrike/foundry-cli/foundry

Run foundry version to verify it's installed correctly.

Getting Started

Clone this sample to your local system, or download as a zip file and import it into Foundry.

git clone https://github.com/CrowdStrike/foundry-sample-functions-python
cd foundry-sample-functions-python

Log in to Foundry:

foundry login

Select the following permissions:

  • Create and run RTR scripts
  • Create, execute and test workflow templates
  • Create, run and view API integrations
  • Create, edit, delete, and list queries

Deploy the app:

foundry apps deploy

Tip

If you get an error that the name already exists, change the name to something unique to your CID in manifest.yml.

Once the deployment has finished, you can release the app:

foundry apps release

Next, go to Foundry > App catalog, find your app, and install it. Go to Fusion SOAR > Workflows to see the test workflows from this app.

About this sample app

This sample is designed to show how to use Python Functions in Falcon Foundry. It contains a few capabilities:

  1. Python functions:

    • hello: Simple greeting service
    • host-details: Uses FalconPy to get Host details
    • servicenow: Uses FalconPy to invoke an API Integration
    • log-event: Uses FalconPy to store data in a collection
  2. Test workflows to invoke each function.

  3. A UI extension on Endpoint security > Endpoint detections that can be used to call the hello function.

See this sample's App docs README for configuration and usage information.

Technical Implementation

Foundry resources



WE STOP BREACHES

About

Functions with Python sample Foundry app

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •