splunk-soar-sdk


Namesplunk-soar-sdk JSON
Version 1.0.0b44 PyPI version JSON
download
home_pageNone
SummaryThe official framework for developing and testing Splunk SOAR Apps
upload_time2025-07-08 23:07:47
maintainerNone
docs_urlNone
authorNone
requires_python<3.14,>=3.9
licenseNone
keywords app cisco connector phantom sdk soar splunk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Splunk SOAR SDK - the official tool for Splunk SOAR app development

<!-- NOTE: Coverage is not dynamically generated, but it is true because CI fails below 100% coverage -->
[![GitHub top language](https://img.shields.io/github/languages/top/phantomcyber/splunk-soar-sdk)](https://github.com/phantomcyber/splunk-soar-sdk)
[![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fphantomcyber%2Fsplunk-soar-sdk%2Fbeta%2Fpyproject.toml)](https://github.com/phantomcyber/splunk-soar-sdk)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/phantomcyber/splunk-soar-sdk/semantic_release.yml)](https://github.com/phantomcyber/splunk-soar-sdk/deployments)
[![Code Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://github.com/phantomcyber/splunk-soar-sdk)
[![GitHub Release](https://img.shields.io/github/v/release/phantomcyber/splunk-soar-sdk?include_prereleases)](https://github.com/phantomcyber/splunk-soar-sdk/releases)
[![PyPI - Version](https://img.shields.io/pypi/v/splunk-soar-sdk.svg)](https://pypi.org/project/splunk-soar-sdk/)
[![PyPI - Status](https://img.shields.io/pypi/status/splunk-soar-sdk)](https://pypi.org/project/splunk-soar-sdk/)
[![PyPI - Types](https://img.shields.io/pypi/types/splunk-soar-sdk)](https://pypi.org/project/splunk-soar-sdk/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Installation

The Splunk SOAR SDK is available as [a package on PyPI](https://pypi.org/project/splunk-soar-sdk/).

The recommended installation method is via [uv](https://docs.astral.sh/uv/).

## Installing the SDK as a tool

This package defines the `soarapps` command line interface. To use it, [install as a uv tool](https://docs.astral.sh/uv/guides/tools/):

```shell
uv tool install splunk-soar-sdk
soarapps --help
```

## Quick Start

**Create a new, empty app**: Run `soarapps init`.

**Migrate an existing app to the SDK**: Run `soarapps convert myapp`, where `myapp` is your app written using BaseConnector. This will convert asset configuration, action declarations, and inputs and outputs. You'll still need to re-implement your action code, as well as any custom views and webhooks.

## Installing the SDK as an app dependency

When developing a new Splunk SOAR app using the SDK, you should use [uv](https://docs.astral.sh/uv/) as your project management tool:

```shell
uv add splunk-soar-sdk
```

Running the above command will add `splunk-soar-sdk` as a dependency of your Splunk SOAR app, in your `pyproject.toml` file.

## Usage

In order to start using SDK and build your first Splunk SOAR App, follow the [Getting Started guide](https://github.com/phantomcyber/splunk-soar-sdk/blob/-/docs/getting_started.md).

A Splunk SOAR app developed with the SDK will look something like this:

Project structure:

```text
string_reverser/
├─ src/
│  ├─ __init__.py
│  ├─ app.py
├─ tests/
│  ├─ __init__.py
│  ├─ test_app.py
├─ .pre-commit-config.yaml
├─ logo.svg
├─ logo_dark.svg
├─ pyproject.toml
```

With `app.py` containing:

```python
from soar_sdk.abstract import SOARClient
from soar_sdk.app import App
from soar_sdk.asset import AssetField, BaseAsset
from soar_sdk.params import Params
from soar_sdk.action_results import ActionOutput


class Asset(BaseAsset):
    base_url: str
    api_key: str = AssetField(sensitive=True, description="API key for authentication")


app = App(name="test_app", asset_cls=Asset, appid="1e1618e7-2f70-4fc0-916a-f96facc2d2e4", app_type="sandbox", logo="logo.svg", logo_dark="logo_dark.svg", product_vendor="Splunk", product_name="Example App", publisher="Splunk")


@app.test_connectivity()
def test_connectivity(client: SOARClient, asset: Asset) -> None:
    client.debug(f"testing connectivity against {asset.base_url}")


class ReverseStringParams(Params):
    input_string: str


class ReverseStringOutput(ActionOutput):
    reversed_string: str


@app.action(action_type="test", verbose="Reverses a string.")
def reverse_string(
    param: ReverseStringParams, client: SOARClient
) -> ReverseStringOutput:
    reversed_string = param.input_string[::-1]
    return ReverseStringOutput(reversed_string=reversed_string)


if __name__ == "__main__":
    app.cli()
```

## Requirements

* [uv](https://docs.astral.sh/uv/getting-started/installation/)
* Python >=3.9
  * Python may be installed locally [with uv](https://docs.astral.sh/uv/guides/install-python/)
* Splunk SOAR >=6.4.0
  * You can get Splunk SOAR Community Edition from [the Splunk website](https://www.splunk.com/en_us/products/splunk-security-orchestration-and-automation.html)

---

Copyright 2025 Splunk Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

<http://www.apache.org/licenses/LICENSE-2.0>

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "splunk-soar-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.14,>=3.9",
    "maintainer_email": null,
    "keywords": "app, cisco, connector, phantom, sdk, soar, splunk",
    "author": null,
    "author_email": "Jacob Davis <jacobd@splunk.com>, Tapish Jain <tapishj@splunk.com>, Janusz Kamie\u0144ski <jkamienski@splunk.com>, Michael Nordby <mnordby@splunk.com>, Scott Odle <sodle@splunk.com>, Micha\u0142 Pos\u0142uszny <mposluszny@splunk.com>, Ian Rokas <grokas@splunk.com>",
    "download_url": "https://files.pythonhosted.org/packages/5e/df/aae287ed60ae245b6e09ddcb016b6cfb658573cedd490e9e9599ccd175c3/splunk_soar_sdk-1.0.0b44.tar.gz",
    "platform": null,
    "description": "# Splunk SOAR SDK - the official tool for Splunk SOAR app development\n\n<!-- NOTE: Coverage is not dynamically generated, but it is true because CI fails below 100% coverage -->\n[![GitHub top language](https://img.shields.io/github/languages/top/phantomcyber/splunk-soar-sdk)](https://github.com/phantomcyber/splunk-soar-sdk)\n[![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fphantomcyber%2Fsplunk-soar-sdk%2Fbeta%2Fpyproject.toml)](https://github.com/phantomcyber/splunk-soar-sdk)\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/phantomcyber/splunk-soar-sdk/semantic_release.yml)](https://github.com/phantomcyber/splunk-soar-sdk/deployments)\n[![Code Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://github.com/phantomcyber/splunk-soar-sdk)\n[![GitHub Release](https://img.shields.io/github/v/release/phantomcyber/splunk-soar-sdk?include_prereleases)](https://github.com/phantomcyber/splunk-soar-sdk/releases)\n[![PyPI - Version](https://img.shields.io/pypi/v/splunk-soar-sdk.svg)](https://pypi.org/project/splunk-soar-sdk/)\n[![PyPI - Status](https://img.shields.io/pypi/status/splunk-soar-sdk)](https://pypi.org/project/splunk-soar-sdk/)\n[![PyPI - Types](https://img.shields.io/pypi/types/splunk-soar-sdk)](https://pypi.org/project/splunk-soar-sdk/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n## Installation\n\nThe Splunk SOAR SDK is available as [a package on PyPI](https://pypi.org/project/splunk-soar-sdk/).\n\nThe recommended installation method is via [uv](https://docs.astral.sh/uv/).\n\n## Installing the SDK as a tool\n\nThis package defines the `soarapps` command line interface. To use it, [install as a uv tool](https://docs.astral.sh/uv/guides/tools/):\n\n```shell\nuv tool install splunk-soar-sdk\nsoarapps --help\n```\n\n## Quick Start\n\n**Create a new, empty app**: Run `soarapps init`.\n\n**Migrate an existing app to the SDK**: Run `soarapps convert myapp`, where `myapp` is your app written using BaseConnector. This will convert asset configuration, action declarations, and inputs and outputs. You'll still need to re-implement your action code, as well as any custom views and webhooks.\n\n## Installing the SDK as an app dependency\n\nWhen developing a new Splunk SOAR app using the SDK, you should use [uv](https://docs.astral.sh/uv/) as your project management tool:\n\n```shell\nuv add splunk-soar-sdk\n```\n\nRunning the above command will add `splunk-soar-sdk` as a dependency of your Splunk SOAR app, in your `pyproject.toml` file.\n\n## Usage\n\nIn order to start using SDK and build your first Splunk SOAR App, follow the [Getting Started guide](https://github.com/phantomcyber/splunk-soar-sdk/blob/-/docs/getting_started.md).\n\nA Splunk SOAR app developed with the SDK will look something like this:\n\nProject structure:\n\n```text\nstring_reverser/\n\u251c\u2500 src/\n\u2502  \u251c\u2500 __init__.py\n\u2502  \u251c\u2500 app.py\n\u251c\u2500 tests/\n\u2502  \u251c\u2500 __init__.py\n\u2502  \u251c\u2500 test_app.py\n\u251c\u2500 .pre-commit-config.yaml\n\u251c\u2500 logo.svg\n\u251c\u2500 logo_dark.svg\n\u251c\u2500 pyproject.toml\n```\n\nWith `app.py` containing:\n\n```python\nfrom soar_sdk.abstract import SOARClient\nfrom soar_sdk.app import App\nfrom soar_sdk.asset import AssetField, BaseAsset\nfrom soar_sdk.params import Params\nfrom soar_sdk.action_results import ActionOutput\n\n\nclass Asset(BaseAsset):\n    base_url: str\n    api_key: str = AssetField(sensitive=True, description=\"API key for authentication\")\n\n\napp = App(name=\"test_app\", asset_cls=Asset, appid=\"1e1618e7-2f70-4fc0-916a-f96facc2d2e4\", app_type=\"sandbox\", logo=\"logo.svg\", logo_dark=\"logo_dark.svg\", product_vendor=\"Splunk\", product_name=\"Example App\", publisher=\"Splunk\")\n\n\n@app.test_connectivity()\ndef test_connectivity(client: SOARClient, asset: Asset) -> None:\n    client.debug(f\"testing connectivity against {asset.base_url}\")\n\n\nclass ReverseStringParams(Params):\n    input_string: str\n\n\nclass ReverseStringOutput(ActionOutput):\n    reversed_string: str\n\n\n@app.action(action_type=\"test\", verbose=\"Reverses a string.\")\ndef reverse_string(\n    param: ReverseStringParams, client: SOARClient\n) -> ReverseStringOutput:\n    reversed_string = param.input_string[::-1]\n    return ReverseStringOutput(reversed_string=reversed_string)\n\n\nif __name__ == \"__main__\":\n    app.cli()\n```\n\n## Requirements\n\n* [uv](https://docs.astral.sh/uv/getting-started/installation/)\n* Python >=3.9\n  * Python may be installed locally [with uv](https://docs.astral.sh/uv/guides/install-python/)\n* Splunk SOAR >=6.4.0\n  * You can get Splunk SOAR Community Edition from [the Splunk website](https://www.splunk.com/en_us/products/splunk-security-orchestration-and-automation.html)\n\n---\n\nCopyright 2025 Splunk Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n<http://www.apache.org/licenses/LICENSE-2.0>\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and limitations under the License.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "The official framework for developing and testing Splunk SOAR Apps",
    "version": "1.0.0b44",
    "project_urls": {
        "Documentation": "https://github.com/phantomcyber/splunk-soar-sdk",
        "Homepage": "https://github.com/phantomcyber/splunk-soar-sdk",
        "Repository": "https://github.com/phantomcyber/splunk-soar-sdk"
    },
    "split_keywords": [
        "app",
        " cisco",
        " connector",
        " phantom",
        " sdk",
        " soar",
        " splunk"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "157a8ab5f693663314aa66a736517b26697eee4e272f9bfe3c263d1cbc89b9d3",
                "md5": "eaf4b4425140cba8baedb94d70733915",
                "sha256": "30ad4d8113ed1395334609639476be2a29fc1efcc8c8f5ce24d69177b8e3b9bd"
            },
            "downloads": -1,
            "filename": "splunk_soar_sdk-1.0.0b44-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eaf4b4425140cba8baedb94d70733915",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.14,>=3.9",
            "size": 113115,
            "upload_time": "2025-07-08T23:07:45",
            "upload_time_iso_8601": "2025-07-08T23:07:45.847490Z",
            "url": "https://files.pythonhosted.org/packages/15/7a/8ab5f693663314aa66a736517b26697eee4e272f9bfe3c263d1cbc89b9d3/splunk_soar_sdk-1.0.0b44-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5edfaae287ed60ae245b6e09ddcb016b6cfb658573cedd490e9e9599ccd175c3",
                "md5": "fb038faf6063752c7ff57491f3d28e2b",
                "sha256": "2497c0c994dbe57d012fe529f27ea7edb86459101e795556cf02ea42ef758d14"
            },
            "downloads": -1,
            "filename": "splunk_soar_sdk-1.0.0b44.tar.gz",
            "has_sig": false,
            "md5_digest": "fb038faf6063752c7ff57491f3d28e2b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.9",
            "size": 370113,
            "upload_time": "2025-07-08T23:07:47",
            "upload_time_iso_8601": "2025-07-08T23:07:47.092298Z",
            "url": "https://files.pythonhosted.org/packages/5e/df/aae287ed60ae245b6e09ddcb016b6cfb658573cedd490e9e9599ccd175c3/splunk_soar_sdk-1.0.0b44.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-08 23:07:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "phantomcyber",
    "github_project": "splunk-soar-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "splunk-soar-sdk"
}
        
Elapsed time: 0.59202s