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. Merge 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 NOTE: 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 whateve 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. manifest
  4. pack
  5. playbook
  6. 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.1.tar.gz (34.4 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.1-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xsoar_cli-1.0.1.tar.gz
  • Upload date:
  • Size: 34.4 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.1.tar.gz
Algorithm Hash digest
SHA256 186ee2dcb44ca48229d7562090f334628e2fdd5b4ef1abac983ce07bb410a842
MD5 3a3580f738e64d21aa2a52c3b5c1e6d1
BLAKE2b-256 28efd848453a5dcc4233d847ea381c4702aef7d0bc909511f78f72331f50e14e

See more details on using hashes here.

Provenance

The following attestation bundles were made for xsoar_cli-1.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: xsoar_cli-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 29.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 70ac1788aace0b86060d08a43ab0dd23a107bdad8a6d5dcbd2587242fd9b92f1
MD5 9a8d456e6c7de0d68cf507df1652679f
BLAKE2b-256 a17c1f64cedaacaf6577ca842bb71f50ee8d2ae153001422efc112743db659f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for xsoar_cli-1.0.1-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