No project description provided
Project description
xsoar-cli
A command-line interface for managing Palo Alto Networks XSOAR (Cortex XSOAR) that streamlines content development and deployment workflows.
Key Features:
- Content Management: Validate and deploy content packs with declarative manifests
- Case Operations: Retrieve case details and clone cases between environments
- Playbook Development: Download playbooks for local editing and testing
- Dependency Analysis: Generate visual graphs of content pack dependencies
- Plugin System: Extend functionality with custom commands
Perfect for DevOps teams using CI/CD pipelines to manage XSOAR content stored in content repositories.
Pull Requests are very welcome and appreciated! See CONTRIBUTING.md for guidelines.
Quick Start
# Install
pip install xsoar-cli
# Create configuration file
xsoar-cli config create
# Validate and deploy your content
xsoar-cli manifest validate ./xsoar_config.json
xsoar-cli manifest deploy ./xsoar_config.json
# Get help on available commands
xsoar-cli --help
Important Notes
This CLI tool is made to be run from the root of a content repository. Some commands depend on files located in your content repository or expects a certain directory structure to be available from your currently working directory.
Requirements
Core Requirements
- XSOAR servers version 6 or 8
- Python 3.9+ (only tested with Python 3.12, earlier versions may work but are not guaranteed)
Additional Requirements
- AWS SDK for Python (Boto3) - Only required when working with custom content packs stored in S3.
- Azure SDK for Python
Installation
pip install xsoar-cli
Upgrading
pip install --upgrade xsoar-cli
Uninstalling
pip uninstall xsoar-cli
Configuration
The xsoar-cli config file is located in ~/.config/xsoar-cli/config.json. To create a configuration file from template, please run:
xsoar-cli config create
Configuration File Structure
After creating the config file, edit it with your XSOAR server details:
{
"default_environment": "xsoar6",
"default_new_case_type": "",
"custom_pack_authors": ["SOMEONE"],
"server_config": {
"xsoar6": {
"base_url": "https://xsoar-v6.example.com",
"api_token": "YOUR API TOKEN HERE",
"artifacts_location": "S3",
"s3_bucket_name": "xsoar-cicd",
"verify_ssl": "/path/to/your/CA_bundle.pem",
"server_version": 6
},
"xsoar8": {
"base_url": "https://xsoar-v8.example.com",
"api_token": "YOUR API TOKEN HERE",
"artifacts_location": "Azure",
"azure_blobstore_url": "https://some/url",
"azure_container_name": "some-container-name",
"verify_ssl": false,
"server_version": 8,
"xsiam_auth_id": 123
}
}
}
Configuration Options
-
default_environment: Which environment to use by default (e.g., "xsoar6")
-
default_new_case_type: Default case type when creating new cases
-
custom_pack_authors: List of author names used in your custom content packs. This helps xsoar-cli distinguish between your custom packs and marketplace packs. Use the same values you have in
pack_metadata.jsonfiles. -
server_config: Define multiple XSOAR environments (xsoar6, xsoar8, etc.)
- base_url: Your XSOAR server URL
- api_token: API token for authentication (see XSOAR documentation for creating API keys)
- artifacts_location: Where artifacts are stored ("Azure" and "S3" is currently supported)
- s3_bucket_name: S3 bucket where your custom content packs are stored (only applicable if using "S3" artifacts location)
- azure_blobstore_url URL to your Azure BlobStore location (only applicable if using "Azure" artifats location)
- azure_container_name Name of the container where blobs should be stored (only applicable if using "Azure" artifats location)
- verify_ssl: SSL certificate verification - use
falsefor self-signed certificates, or path to CA bundle - server_version: XSOAR server version (6 or 8)
- xsiam_auth_id: Required for XSOAR 8 (XSIAM) - the authentication ID for API access
Validation
Test your configuration with:
xsoar-cli config validate
This will verify connectivity to all configured XSOAR environments.
Usage
xsoar-cli <command> <sub-command> <args>
For information about available commands, run xsoar-cli without arguments.
For more information on a specific command execute xsoar-cli <command> --help.
Commands
- case - Retrieve case details and clone cases between environments
- config - Create, validate, and manage CLI configuration files
- graph - Generate visual dependency graphs for content packs
- manifest - Validate and deploy content using declarative manifests
- pack - Manage content pack operations and information
- playbook - Download playbooks for local editing and development
- plugins - Extend CLI functionality with custom commands
Plugin System
xsoar-cli supports a plugin system that allows you to extend the CLI with custom commands. For complete documentation, examples, and usage instructions, see Plugin System Documentation.
Troubleshooting
Common Issues
"Config file not found"
- Run
xsoar-cli config createto generate a template configuration file - Ensure the file exists at
~/.config/xsoar-cli/config.json
"Failed to reach pack" or connection errors
- Verify your XSOAR server URL and API token in the config file
- Check network connectivity to your XSOAR server
- For custom packs: Ensure AWS credentials are configured and S3 bucket is accessible
"Invalid environment"
- Check that the environment name matches exactly what's defined in your config file
- Use
xsoar-cli config validateto verify your configuration
Python compatibility issues
- Ensure you're using Python 3.9 or later
- Consider using Python 3.12 for best compatibility
Contributing
We welcome all contributions! Please see CONTRIBUTING.md for detailed guidelines on how to contribute to this project.
License
xsoar-cli is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xsoar_cli-1.0.8.tar.gz.
File metadata
- Download URL: xsoar_cli-1.0.8.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15610835b026224d4fcf2835d5da6af557f025424da4ec55bb464850a3e7f026
|
|
| MD5 |
324ba2730de787c2d398bebe14dc96bb
|
|
| BLAKE2b-256 |
a6bd125b40adb4813d532e75ddf487128ef5d96d997df6c4c4bfb001612163ef
|
Provenance
The following attestation bundles were made for xsoar_cli-1.0.8.tar.gz:
Publisher:
release.yml on tlium/xsoar-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xsoar_cli-1.0.8.tar.gz -
Subject digest:
15610835b026224d4fcf2835d5da6af557f025424da4ec55bb464850a3e7f026 - Sigstore transparency entry: 833816340
- Sigstore integration time:
-
Permalink:
tlium/xsoar-cli@a2bcee351a459a2a683a428bf2f06a15e9643b3e -
Branch / Tag:
refs/tags/1.0.8 - Owner: https://github.com/tlium
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a2bcee351a459a2a683a428bf2f06a15e9643b3e -
Trigger Event:
release
-
Statement type:
File details
Details for the file xsoar_cli-1.0.8-py3-none-any.whl.
File metadata
- Download URL: xsoar_cli-1.0.8-py3-none-any.whl
- Upload date:
- Size: 30.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8160128618dce785d487f29c129ff0b3c4d41ddd984eb84f828858f87d9594b
|
|
| MD5 |
be128de8319b1a4025784626d5b83d35
|
|
| BLAKE2b-256 |
82aeb379ac541727df3aabf42002a0856c147ba7e16c07599d87e24c7992c4a8
|
Provenance
The following attestation bundles were made for xsoar_cli-1.0.8-py3-none-any.whl:
Publisher:
release.yml on tlium/xsoar-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xsoar_cli-1.0.8-py3-none-any.whl -
Subject digest:
c8160128618dce785d487f29c129ff0b3c4d41ddd984eb84f828858f87d9594b - Sigstore transparency entry: 833816341
- Sigstore integration time:
-
Permalink:
tlium/xsoar-cli@a2bcee351a459a2a683a428bf2f06a15e9643b3e -
Branch / Tag:
refs/tags/1.0.8 - Owner: https://github.com/tlium
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a2bcee351a459a2a683a428bf2f06a15e9643b3e -
Trigger Event:
release
-
Statement type: