Simplified BriskSec Toolbox Wrapper SDK for Python - focused on output parsing and event generation
Project description
BriskSec Toolbox Wrapper SDK for Python
A simplified Python SDK for parsing security tool outputs and generating events and findings. The Go runtime handles all the complex wrapper logic, messaging, HTTP servers, and pub/sub functionality.
Philosophy
This SDK follows a simple philosophy:
- Focus on parsing: Your Python code should only focus on parsing tool outputs
- Let Go handle complexity: The Go runtime manages all wrapper infrastructure
- Type generation: Use
tools/typegento generate Python types from Go structs
Installation
pip install -e .
Usage
Basic Parser
Create a parser by extending OutputParser:
from brisksec_toolbox_wrapper_sdk import OutputParser, Event, Finding
class MyToolParser(OutputParser):
def parse_output(self, output: str, metadata=None):
events = []
findings = []
# Parse your tool output here
# Convert to events and findings
return {
"events": events,
"findings": findings
}
Events vs Findings
- Events: Use for asset discovery (IPs, ports, domains, etc.)
- Findings: Use for security vulnerabilities and issues
Example: Nmap Parser
from brisksec_toolbox_wrapper_sdk import OutputParser, AssetIPEvent, AssetPortEvent
class NmapParser(OutputParser):
def parse_output(self, output: str, metadata=None):
events = []
# Parse XML and create events
events.append(AssetIPEvent(ip="192.168.1.1"))
events.append(AssetPortEvent(ip="192.168.1.1", port="80", protocol="tcp"))
return {"events": events, "findings": []}
Type Generation
The Python types are auto-generated from Go structs using tools/typegen. To regenerate types:
cd tools/typegen
go run main.go
This ensures that Python types stay in sync with the Go runtime types.
Removed Complexity
In this simplified version, we removed:
- Complex wrapper base classes
- HTTP server logic (FastAPI/uvicorn)
- Message handling infrastructure
- Pub/sub logic
- Command execution utilities
All of this is now handled by the Go runtime, making the Python SDK focused and lightweight.
Migration from v0.1.x
If you were using the old wrapper classes:
Old approach:
class MyWrapper(BaseWrapper):
def handle_scan(self, message):
# Complex message handling
pass
New approach:
class MyParser(OutputParser):
def parse_output(self, output, metadata=None):
# Simple output parsing
return {"events": [], "findings": []}
The Go runtime will call your parser and handle all the infrastructure.
Development
Running Tests
pytest tests/
Code Formatting
black .
isort .
Type Checking
mypy brisksec_toolbox_wrapper_sdk/
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 brisksec_toolbox_wrapper_sdk-0.2.0.tar.gz.
File metadata
- Download URL: brisksec_toolbox_wrapper_sdk-0.2.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3555f04deeb138333de58eafd57ba558dd003046c95b8b12eab86725510dd58c
|
|
| MD5 |
8e30c148ed1dbf8795cae81cb7a90d01
|
|
| BLAKE2b-256 |
c6274e1c1486588d2d2ad15319a19afdd2398450b0449d8809e918d146d0f22a
|
Provenance
The following attestation bundles were made for brisksec_toolbox_wrapper_sdk-0.2.0.tar.gz:
Publisher:
publish.yml on BriskStack/brisksec-toolbox-wrapper-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brisksec_toolbox_wrapper_sdk-0.2.0.tar.gz -
Subject digest:
3555f04deeb138333de58eafd57ba558dd003046c95b8b12eab86725510dd58c - Sigstore transparency entry: 252776944
- Sigstore integration time:
-
Permalink:
BriskStack/brisksec-toolbox-wrapper-sdk@4c99ac62b11cea34b93523929e1c653c78abef44 -
Branch / Tag:
refs/tags/v1.2025.0627.0412 - Owner: https://github.com/BriskStack
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4c99ac62b11cea34b93523929e1c653c78abef44 -
Trigger Event:
push
-
Statement type:
File details
Details for the file brisksec_toolbox_wrapper_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: brisksec_toolbox_wrapper_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9807f8b31425894cb959865f20bcb6ebd0eb21a1098e595b71cf560e3a75578
|
|
| MD5 |
8b2abff78f25d84fb563be5fe7146d62
|
|
| BLAKE2b-256 |
6969babbe54620f0f2720898951bf32b6a1db6a6fa3077f25f6639573a6e77f2
|
Provenance
The following attestation bundles were made for brisksec_toolbox_wrapper_sdk-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on BriskStack/brisksec-toolbox-wrapper-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brisksec_toolbox_wrapper_sdk-0.2.0-py3-none-any.whl -
Subject digest:
f9807f8b31425894cb959865f20bcb6ebd0eb21a1098e595b71cf560e3a75578 - Sigstore transparency entry: 252776958
- Sigstore integration time:
-
Permalink:
BriskStack/brisksec-toolbox-wrapper-sdk@4c99ac62b11cea34b93523929e1c653c78abef44 -
Branch / Tag:
refs/tags/v1.2025.0627.0412 - Owner: https://github.com/BriskStack
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4c99ac62b11cea34b93523929e1c653c78abef44 -
Trigger Event:
push
-
Statement type: