Python SDK for building OpenSOAR integrations and playbooks
Project description
OpenSOAR SDK
Python SDK for building integrations and playbooks for the OpenSOAR SOAR platform.
Install
pip install opensoar-sdk
Build an Integration
from opensoar_sdk import Integration, action
class MyIntegration(Integration):
name = "my-tool"
async def connect(self):
self.client = MyToolClient(self.config["api_key"])
async def health_check(self) -> bool:
return await self.client.ping()
@action(timeout=30, retries=2)
async def lookup_ip(self, ip: str) -> dict:
return await self.client.query(ip)
Write a Playbook
from opensoar_sdk import playbook, action
@playbook(trigger="webhook", conditions={"severity": ["high", "critical"]})
async def triage_alert(alert):
result = await enrich_ip(alert.source_ip)
if result.malicious:
await block_ip(alert.source_ip)
await notify_slack(f"Blocked {alert.source_ip}")
Testing
from opensoar_sdk.testing import mock_alert, mock_run_context
async def test_my_playbook():
alert = mock_alert(severity="high", source_ip="1.2.3.4")
async with mock_run_context():
await triage_alert(alert)
Part of OpenSOAR
See the main repo for full documentation.
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 opensoar_sdk-0.1.1.tar.gz.
File metadata
- Download URL: opensoar_sdk-0.1.1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
141b1b2f5dc07a4598a9c0d748afab816009da634cd384a039b624546e7b5f9a
|
|
| MD5 |
f307fc272ea5a2cdd8773a73c0a04be6
|
|
| BLAKE2b-256 |
5c96b9addb3409e78ad47950b3588d048b72d14ae0b87612b5c544160615aa52
|
Provenance
The following attestation bundles were made for opensoar_sdk-0.1.1.tar.gz:
Publisher:
build.yml on opensoar-hq/opensoar-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opensoar_sdk-0.1.1.tar.gz -
Subject digest:
141b1b2f5dc07a4598a9c0d748afab816009da634cd384a039b624546e7b5f9a - Sigstore transparency entry: 1097123408
- Sigstore integration time:
-
Permalink:
opensoar-hq/opensoar-sdk@5ee2b7019e285237c99f0be7ea286f5aed7fb348 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/opensoar-hq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@5ee2b7019e285237c99f0be7ea286f5aed7fb348 -
Trigger Event:
push
-
Statement type:
File details
Details for the file opensoar_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: opensoar_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.7 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 |
4a9003f9647c71d5b392e99e120c39451ec3060c413a6c2ed4739d02b3bfbfb7
|
|
| MD5 |
ba0790af25d9ac1940a7207820730fa3
|
|
| BLAKE2b-256 |
c9e409da3f0b2e6d6f2c2e3680bbed320d304405e382aba36f8760c31c4ca0d3
|
Provenance
The following attestation bundles were made for opensoar_sdk-0.1.1-py3-none-any.whl:
Publisher:
build.yml on opensoar-hq/opensoar-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opensoar_sdk-0.1.1-py3-none-any.whl -
Subject digest:
4a9003f9647c71d5b392e99e120c39451ec3060c413a6c2ed4739d02b3bfbfb7 - Sigstore transparency entry: 1097123608
- Sigstore integration time:
-
Permalink:
opensoar-hq/opensoar-sdk@5ee2b7019e285237c99f0be7ea286f5aed7fb348 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/opensoar-hq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@5ee2b7019e285237c99f0be7ea286f5aed7fb348 -
Trigger Event:
push
-
Statement type: