Skip to main content

No project description provided

Project description

xsoar-cli


This tool is made to help provide a smoother workflow for developers, but also for power users to get useful information out of XSOAR from the terminal. It is mostly useful if you are using a CICD workflow to deploy your XSOAR content, and most of the functionality assumest that you have your content stored in a content repository.

Pull Requests are very welcome and appreciated!

IMPORTANT NOTE This CLI tools is made to be run from the root of a content repository. Some commands depends on files located in your content repository or expects a certain directory structure to be available from your currently working directory.

Installation

pip install xsoar-cli

Upgrading

pip install --upgrade 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

Open up the newly created configuration file and add values that correspond with your environment.

IMPORTANT NOTES

  • The configuration key "custom_pack_authors": ["SOMEONE"] is needed in order for xsoar-cli to be able to determine which content packs are your own custom content packs and which are supplied from Palo Alto upstream. Use whatever values you may have set in pack_metadata.json in the content packs in your content repository.

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

  1. case
  2. config
  3. graph
  4. manifest
  5. pack
  6. playbook
  7. plugins

Plugin System

xsoar-cli supports a plugin system that allows you to extend the CLI with custom commands. Plugins are Python files that you place in ~/.local/xsoar-cli/plugins/ and they're automatically discovered and loaded.

Quick Start with Plugins

  1. Create an example plugin:

    xsoar-cli plugins create-example
    
  2. List available plugins:

    xsoar-cli plugins list
    
  3. Test the example plugin:

    xsoar-cli example hello --name "World"
    

Plugin Management Commands

  • xsoar-cli plugins list - List all plugins
  • xsoar-cli plugins info <plugin> - Show plugin information
  • xsoar-cli plugins validate - Validate all plugins
  • xsoar-cli plugins reload <plugin> - Reload a specific plugin
  • xsoar-cli plugins create-example - Create an example plugin
  • xsoar-cli plugins open - Open the plugins directory

Creating Your Own Plugins

Create a Python file in ~/.local/xsoar-cli/plugins/ that inherits from XSOARPlugin:

import click
from xsoar_cli.plugins import XSOARPlugin

class MyPlugin(XSOARPlugin):
    @property
    def name(self) -> str:
        return "myplugin"

    @property
    def version(self) -> str:
        return "1.0.0"

    def get_command(self) -> click.Command:
        @click.command(help="My custom command")
        def mycommand():
            click.echo("Hello from my plugin!")
        return mycommand

For detailed documentation, see Plugin System Documentation.

License

xsoar-cli is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xsoar_cli-1.0.2.tar.gz (34.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xsoar_cli-1.0.2-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file xsoar_cli-1.0.2.tar.gz.

File metadata

  • Download URL: xsoar_cli-1.0.2.tar.gz
  • Upload date:
  • Size: 34.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for xsoar_cli-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0ce44dbe2c22dde7ec621ea5de6bec3e5ca6827a00f66c3115e123720915029f
MD5 d9ce35fe4c902d52fd44faba668a85ff
BLAKE2b-256 477c01857b78d54985eb54b898f58d47061f9c5128d433d67bd349d3890b8a96

See more details on using hashes here.

Provenance

The following attestation bundles were made for xsoar_cli-1.0.2.tar.gz:

Publisher: release.yml on tlium/xsoar-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xsoar_cli-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: xsoar_cli-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for xsoar_cli-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5357ced8a2130b2482f60a89cea58ad99f19fab31e8d77ea85d801397fa60d49
MD5 cf7ff166930ca8d0d2bcf5bc0ff4a148
BLAKE2b-256 4c4b0f234016c992edbab55b55780068f155c8ed5c88cb2566f4fe3d04460650

See more details on using hashes here.

Provenance

The following attestation bundles were made for xsoar_cli-1.0.2-py3-none-any.whl:

Publisher: release.yml on tlium/xsoar-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page