Note: this article is brief, please refer to the end-to-end Tutorial for more details.
Our recommended OS for development is either macOS or Linux, as we use bash and docker in some of our validation/testing flows.
If you are working on Windows, you can either work with a Linux VM or utilize Windows Subsystem for Linux.
Note: When using WSL2 you may experience performance issues if working on the Windows mounted file system (for example
/mnt/c/). See the following WSL issue for more info. In such cases we recommend using the Linux file system (
ext4 partition) WSL2 provides. Meaning that the local demisto content and the SDK will all be located on the WSL file system and using an editor which supports remote WSL. Editors supporting remote WSL include:
- VS Code: https://code.visualstudio.com/docs/remote/wsl
- PyCharm Professional Edition: https://www.jetbrains.com/help/pycharm/using-wsl-as-a-remote-interpreter.html
We use GitHub (as you can see). See: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git for git client install instructions.
Our repository utilizes mostly Python 3 (3.7 and up).
We recommend managing python versions via pyenv
Optionally, macOS users can install via homebrew.
Node.js and NPM
Optional. We use Node.js for validating README documentation files for Integrations, Automations and Playbooks. If you are creating README documentation files, we recommend installing Node.js to be able to validate the files locally. Node.js installation instructions for your target platform are available at: https://nodejs.org/en/download/package-manager/.
Setting Up a Development Repository
Fork the Cortex XSOAR Content repository and create a branch for your contribution.
Install Python virtualenv
We recommend using virtualenv to create an isolated virtual python development environment. To install virtual env run:
Note: Python 3 includes the
venv module for creating virtual envs, but it does not permit creating virtual envs with other versions of Python (such as Python 2). Thus, we use the
virtualenv is installed you can run the
bootstrap script. The script will setup a pre-commit hook which will validate your modified files before committing and setup a python virtual env for development with the package requirements for python3. Run the script from the root directory of the source tree:
After completing, you can activate the newly created virtual env by running:
Note: To ease setup, by default for forked repositories we don't setup Python 2 as part of the virtual env setup. If you require Python 2 for your automations/integrations run the
.hooks/bootstrap script with the environment variable set:
SETUP_PY2=yes. When run with
SETUP_PY2=yes set, the virtualenv built contains both Python 2 and 3.
python2 will point to Python 2 and
python3 to Python 3.
This is our help tool that will make your lives easier during the contribution process, it will help you generate a
Pack. And will help you maintain your files and validate them before committing to the branch. It is installed via our
Boostrap process. If for prefer to install the
demisto-sdk manually see instructions here.
To check the you have the latest version of the sdk run:
Congratulations! You now have a fully configured virtual env, where you can run our different validation and utility scripts.
If you want more details, please refer to the end-to-end Tutorial.
Cortex XSOAR offers two IDEs for developing:
You can also use your IDE of choice along with