Skip to content

Commit 3db83a5

Browse files
authored
Merge pull request #2 from CrowdStrike/repo-docs
Add required repository docs
2 parents 1d8ef56 + 13956b3 commit 3db83a5

15 files changed

+645
-211
lines changed

CITATION.cff

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
cff-version: 1.2.0
2+
title: 'CrowdStrike Foundry Sample App - Functions with Python'
3+
message: >-
4+
If you use this software, and wish to cite the origins,
5+
please use metadata from this file.
6+
type: software
7+
authors:
8+
- given-names:
9+
family-names: CrowdStrike
10+
email: oss-questions@crowdstrike.com
11+
repository-code: 'https://github.com/CrowdStrike/foundry-sample-functions-python'
12+
url: 'https://www.crowdstrike.com'
13+
abstract: >-
14+
The CrowdStrike Foundry Sample App - Functions with Python
15+
is a community-driven, open source project designed
16+
to illustrate creating apps with CrowdStrike Foundry.
17+
keywords:
18+
- crowdstrike
19+
- oauth2
20+
- crowdstrike-foundry
21+
- python
22+
- windows
23+
- linux
24+
- mac
25+
license: MIT

CODE_OF_CONDUCT.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
![CrowdStrike Falcon](/images/cs-logo.png?raw=true)
2+
3+
[![CrowdStrike Subreddit](https://img.shields.io/badge/-r%2Fcrowdstrike-white?logo=reddit&labelColor=gray&link=https%3A%2F%2Freddit.com%2Fr%2Fcrowdstrike)](https://reddit.com/r/crowdstrike)
4+
5+
# Foundry Community Code of Conduct
6+
7+
## Our Pledge
8+
9+
We as members, contributors, and leaders pledge to make participation in our
10+
community a harassment-free experience for everyone, regardless of age, body
11+
size, visible or invisible disability, ethnicity, sex characteristics, gender
12+
identity and expression, level of experience, education, socio-economic status,
13+
nationality, personal appearance, race, religion, or sexual identity
14+
and orientation.
15+
16+
We pledge to act and interact in ways that contribute to an open, welcoming,
17+
diverse, inclusive, and healthy community.
18+
19+
## Our Standards
20+
21+
Examples of behavior that contributes to a positive environment for our
22+
community include:
23+
24+
* Demonstrating empathy and kindness toward other people
25+
* Being respectful of differing opinions, viewpoints, and experiences
26+
* Giving and gracefully accepting constructive feedback
27+
* Accepting responsibility and apologizing to those affected by our mistakes,
28+
and learning from the experience
29+
* Focusing on what is best not just for us as individuals, but for the
30+
overall community
31+
32+
Examples of unacceptable behavior include:
33+
34+
* The use of sexualized language or imagery, and sexual attention or
35+
advances of any kind
36+
* Trolling, insulting or derogatory comments, and personal or political attacks
37+
* Public or private harassment
38+
* Publishing others' private information, such as a physical or email
39+
address, without their explicit permission
40+
* Other conduct which could reasonably be considered inappropriate in a
41+
professional setting
42+
43+
## Enforcement Responsibilities
44+
45+
Community leaders are responsible for clarifying and enforcing our standards of
46+
acceptable behavior and will take appropriate and fair corrective action in
47+
response to any behavior that they deem inappropriate, threatening, offensive,
48+
or harmful.
49+
50+
Community leaders have the right and responsibility to remove, edit, or reject
51+
comments, commits, code, wiki edits, issues, and other contributions that are
52+
not aligned to this Code of Conduct, and will communicate reasons for moderation
53+
decisions when appropriate.
54+
55+
## Scope
56+
57+
This Code of Conduct applies within all community spaces, and also applies when
58+
an individual is officially representing the community in public spaces.
59+
Examples of representing our community include using an official e-mail address,
60+
posting via an official social media account, or acting as an appointed
61+
representative at an online or offline event.
62+
63+
## Enforcement
64+
65+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
66+
reported to the community leaders responsible for enforcement at
67+
oss-conduct@crowdstrike.com or https://crowdstrike.ethicspoint.com/.
68+
69+
All complaints will be reviewed and investigated promptly and fairly.
70+
71+
All community leaders are obligated to respect the privacy and security of the
72+
reporter of any incident.
73+
74+
## Enforcement Guidelines
75+
76+
Community leaders will follow these Community Impact Guidelines in determining
77+
the consequences for any action they deem in violation of this Code of Conduct:
78+
79+
### 1. Correction
80+
81+
**Community Impact**: Use of inappropriate language or other behavior deemed
82+
unprofessional or unwelcome in the community.
83+
84+
**Consequence**: A private, written warning from community leaders, providing
85+
clarity around the nature of the violation and an explanation of why the
86+
behavior was inappropriate. A public apology may be requested.
87+
88+
### 2. Warning
89+
90+
**Community Impact**: A violation through a single incident or series
91+
of actions.
92+
93+
**Consequence**: A warning with consequences for continued behavior. No
94+
interaction with the people involved, including unsolicited interaction with
95+
those enforcing the Code of Conduct, for a specified period of time. This
96+
includes avoiding interactions in community spaces as well as external channels
97+
like social media. Violating these terms may lead to a temporary or
98+
permanent ban.
99+
100+
### 3. Temporary Ban
101+
102+
**Community Impact**: A serious violation of community standards, including
103+
sustained inappropriate behavior.
104+
105+
**Consequence**: A temporary ban from any sort of interaction or public
106+
communication with the community for a specified period of time. No public or
107+
private interaction with the people involved, including unsolicited interaction
108+
with those enforcing the Code of Conduct, is allowed during this period.
109+
Violating these terms may lead to a permanent ban.
110+
111+
### 4. Permanent Ban
112+
113+
**Community Impact**: Demonstrating a pattern of violation of community
114+
standards, including sustained inappropriate behavior, harassment of an
115+
individual, or aggression toward or disparagement of classes of individuals.
116+
117+
**Consequence**: A permanent ban from any sort of public interaction within
118+
the community.
119+
120+
## Attribution
121+
122+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
123+
version 2.0, available at
124+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
125+
126+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
127+
enforcement ladder](https://github.com/mozilla/diversity).
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
131+
For answers to common questions about this code of conduct, see the FAQ at
132+
https://www.contributor-covenant.org/faq. Translations are available at
133+
https://www.contributor-covenant.org/translations.
134+
135+
136+
---
137+
138+
<p align="center"><img src="/images/cs-logo-footer.png"><br/><img width="300px" src="/images/alliance-team.png"></p>
139+
<h3><p align="center">WE STOP BREACHES</p></h3>

CONTRIBUTING.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
![CrowdStrike Falcon](/images/cs-logo.png?raw=true)
2+
3+
[![CrowdStrike Subreddit](https://img.shields.io/badge/-r%2Fcrowdstrike-white?logo=reddit&labelColor=gray&link=https%3A%2F%2Freddit.com%2Fr%2Fcrowdstrike)](https://reddit.com/r/crowdstrike)
4+
5+
# Contributing to this repository
6+
7+
![Hollywood Adversaries](/images/hollywood-adversaries.jpg?raw=true)
8+
9+
Please review this document for details regarding getting started with your first contribution, packages you'll need to install as a developer, and our Pull Request process. If you have any questions, please let us know by posting your question as an [issue](https://github.com/CrowdStrike/foundry-sample-functions-python/issues).
10+
11+
> **Before you begin**: Have you read the [Code of Conduct](CODE_OF_CONDUCT.md)?
12+
> The Code of Conduct helps us establish community norms and how they'll be enforced.
13+
14+
## Issues
15+
16+
Issues are very valuable to this project.
17+
18+
- Ideas are a valuable source of contributions others can make
19+
- Problems show where this project is lacking
20+
- With a question you show where contributors can improve the user
21+
experience
22+
23+
Thank you for creating them.
24+
25+
## Pull Requests
26+
27+
Pull requests are a great way to get your ideas into this repository.
28+
29+
When deciding if we merge in a pull request we look at the following
30+
things:
31+
32+
### Does it state intent
33+
34+
You should be clear which problem you're trying to solve with your
35+
contribution.
36+
37+
For example:
38+
39+
> Add link to code of conduct in README.md
40+
41+
Doesn't tell me anything about why you're doing that
42+
43+
> Add link to code of conduct in README.md because users don't always
44+
> look in the CONTRIBUTING.md
45+
46+
Tells us the problem that you have found, and the pull request shows us
47+
the action you have taken to solve it.
48+
49+
### Is it of good quality
50+
51+
- There are no spelling mistakes
52+
- It reads well
53+
- For english language contributions: Has a good score on
54+
[Grammarly](https://www.grammarly.com) or [Hemingway
55+
App](https://www.hemingwayapp.com/)
56+
57+
### Does it move this repository closer to our vision for the repository
58+
59+
The aim of this repository is:
60+
61+
- To provide a sample for Falcon Foundry so users can learn from it
62+
- The content is usable by someone who hasn't written something like
63+
this before
64+
- Foster a culture of respect and gratitude in the open source
65+
community.
66+
67+
### Does it follow the contributor covenant
68+
69+
This repository has a [code of conduct](CODE_OF_CONDUCT.md), we will
70+
remove things that do not respect it.
71+
72+
---
73+
74+
<p align="center"><img src="/images/cs-logo-footer.png"><br/><img width="300px" src="/images/turbine-panda.png"></p>
75+
<h3><p align="center">WE STOP BREACHES</p></h3>

README.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,118 @@
1+
![CrowdStrike Falcon](/images/cs-logo.png?raw=true)
2+
13
# Functions with Python sample Foundry app
4+
5+
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.
6+
7+
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.
8+
9+
> [!IMPORTANT]
10+
> To view documentation and deploy this sample app, you need access to the Falcon console.
11+
12+
## Description
13+
14+
The Functions with Python sample Foundry app shows how to use Python functions with FalconPy, workflows, API integrations, collections, and UI extensions.
15+
16+
## Prerequisites
17+
18+
* The Foundry CLI (instructions below).
19+
* Python 3.9+ (needed if running the app's functions locally). See [Python For Beginners](https://www.python.org/about/gettingstarted/) for installation instructions.
20+
21+
### Install the Foundry CLI
22+
23+
You can install the Foundry CLI with Scoop on Windows or Homebrew on Linux/macOS.
24+
25+
**Windows**:
26+
27+
Install [Scoop](https://scoop.sh/). Then, add the Foundry CLI bucket and install the Foundry CLI.
28+
29+
```shell
30+
scoop bucket add foundry https://github.com/crowdstrike/scoop-foundry-cli.git
31+
scoop install foundry
32+
```
33+
34+
Or, you can download the [latest Windows zip file](https://assets.foundry.crowdstrike.com/cli/latest/foundry_Windows_x86_64.zip), expand it, and add the install directory to your PATH environment variable.
35+
36+
**Linux and macOS**:
37+
38+
Install [Homebrew](https://docs.brew.sh/Installation). Then, add the Foundry CLI repository to the list of formulae that Homebrew uses and install the CLI:
39+
40+
```shell
41+
brew tap crowdstrike/foundry-cli
42+
brew install crowdstrike/foundry-cli/foundry
43+
```
44+
45+
Run `foundry version` to verify it's installed correctly.
46+
47+
## Getting Started
48+
49+
Clone this sample to your local system, or [download as a zip file](https://github.com/CrowdStrike/foundry-sample-functions-python/archive/refs/heads/main.zip) and import it into Foundry.
50+
51+
```shell
52+
git clone https://github.com/CrowdStrike/foundry-sample-functions-python
53+
cd foundry-sample-functions-python
54+
```
55+
56+
Log in to Foundry:
57+
58+
```shell
59+
foundry login
60+
```
61+
62+
Select the following permissions:
63+
64+
- [ ] Create and run RTR scripts
65+
- [x] Create, execute and test workflow templates
66+
- [x] Create, run and view API integrations
67+
- [ ] Create, edit, delete, and list queries
68+
69+
Deploy the app:
70+
71+
```shell
72+
foundry apps deploy
73+
```
74+
75+
> [!TIP]
76+
> If you get an error that the name already exists, change the name to something unique to your CID in `manifest.yml`.
77+
78+
Once the deployment has finished, you can release the app:
79+
80+
```shell
81+
foundry apps release
82+
```
83+
84+
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.
85+
86+
## About this sample app
87+
88+
<!-- Intro below should match app_docs/README.md -->
89+
90+
This sample is designed to show how to use Python Functions in Falcon Foundry. It contains a few capabilities:
91+
92+
1. Python functions:
93+
94+
- **hello**: Simple greeting service
95+
- **host-details**: Uses FalconPy to get Host details
96+
- **servicenow**: Uses FalconPy to invoke an API Integration
97+
- **log-event**: Uses FalconPy to store data in a collection
98+
99+
2. Test workflows to invoke each function.
100+
3. A UI extension on **Endpoint security** > **Endpoint detections** that can be used to call the `hello` function.
101+
102+
See this sample's [App docs README](app_docs/README.md) for configuration and usage information.
103+
104+
## Technical Implementation
105+
106+
- Built on CrowdStrike's Foundry Function framework
107+
- Written in Python with dependencies including:
108+
- [crowdstrike-foundry-function](https://github.com/CrowdStrike/foundry-fn-python) and [FalconPy](https://falconpy.io/) for CrowdStrike API integration
109+
110+
## Foundry resources
111+
112+
- Foundry documentation: [US-1](https://falcon.crowdstrike.com/documentation/category/c3d64B8e/falcon-foundry) | [US-2](https://falcon.us-2.crowdstrike.com/documentation/category/c3d64B8e/falcon-foundry) | [EU](https://falcon.eu-1.crowdstrike.com/documentation/category/c3d64B8e/falcon-foundry)
113+
- Foundry learning resources: [US-1](https://falcon.crowdstrike.com/foundry/learn) | [US-2](https://falcon.us-2.crowdstrike.com/foundry/learn) | [EU](https://falcon.eu-1.crowdstrike.com/foundry/learn)
114+
115+
---
116+
117+
<p align="center"><img src="/images/cs-logo-footer.png"><br/><img width="300px" src="/images/adversary-goblin-panda.png"></p>
118+
<h3><p align="center">WE STOP BREACHES</p></h3>

SECURITY.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
![CrowdStrike Falcon](/images/cs-logo.png?raw=true)
2+
3+
# Security Policy
4+
5+
This document outlines security policy and procedures for the CrowdStrike `foundry-sample-functions-python` project.
6+
7+
## Reporting a potential security vulnerability
8+
9+
We have multiple avenues to receive security-related vulnerability reports.
10+
As mentioned in [SUPPORT](https://github.com/CrowdStrike/foundry-sample-functions-python/blob/main/SUPPORT.md), this project is generally not a supported CrowdStrike project.
11+
12+
Please report suspected security vulnerabilities by:
13+
14+
+ Submitting
15+
a [bug](https://github.com/CrowdStrike/foundry-sample-functions-python/issues/new?assignees=&labels=bug+%3Abug%3A&template=bug_report.md&title=%5B+BUG+%5D+...).
16+
+ Submitting a [pull request](https://github.com/CrowdStrike/foundry-sample-functions-python/pulls) to potentially resolve the issue. (New
17+
contributors: please review the content
18+
located [here](https://github.com/CrowdStrike/foundry-sample-functions-python/blob/main/CONTRIBUTING.md).)
19+
+ Sending an email to __oss-security@crowdstrike.com__.
20+
21+
---
22+
23+
<p align="center"><img src="/images/cs-logo-footer.png"><br/><img width="300px" src="/images/adversary-goblin-panda.png"></p>
24+
<h3><p align="center">WE STOP BREACHES</p></h3>

0 commit comments

Comments
 (0)