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-0.0.3.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-0.0.3-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xsoar_cli-0.0.3.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-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bdd451139054ef40cf21e4e6265a88285955912db251128156c8b3250802177a
MD5 6e3e2154b64029a05cee95b83ab5789f
BLAKE2b-256 5a526ab83bc89b8abe00620d5be7ce88ee12990ca0bd1622ec2ab9ffeb8c1326

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: xsoar_cli-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 29.1 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-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3ffd5afd532f0cde277c606dd60177f93ddc67738bdc4a1348b95d4a89821af0
MD5 1f7aa357de6452f40327c0b17054c20f
BLAKE2b-256 04ac03fc3da7a8d4e2e646acb6c1c10d0298391d9277bb9c74eaa3758ad972de

See more details on using hashes here.

Provenance

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