Sentineliqsdk
Modern Python library of utility classes for SentinelIQ analyzers and responders.
Note: This SDK now exposes only the modern API (Python 3.13). Legacy helper aliases
such as getData, getParam, checkTlp, and notSupported were removed. Migrate to
get_data, get_param, and rely on automatic TLP/PAP enforcement in Worker.
Installing
To install this package, run:
pip install sentineliqsdk
Using
Example usage:
from __future__ import annotations
import json
from sentineliqsdk import Analyzer, Extractor, Worker, runner, WorkerInput
class EchoAnalyzer(Analyzer):
def execute(self):
value = self.get_data()
return self.report({"echo": value})
def run(self):
return self.execute()
if __name__ == "__main__":
# Option A: instantiate directly
report = EchoAnalyzer(WorkerInput(data_type="ip", data="1.2.3.4")).run()
print(json.dumps(report.full_report, ensure_ascii=False))
# Option B: use runner with input_data
runner(EchoAnalyzer, WorkerInput(data_type="ip", data="8.8.8.8"))
Internal structure (for maintainers):
src/sentineliqsdk/core/worker.pysrc/sentineliqsdk/analyzers/base.pysrc/sentineliqsdk/responders/base.pysrc/sentineliqsdk/extractors/regex.py(Extractor uses stdlib validators: ipaddress, urlparse)
Extractor
The Extractor detects common IOC types using Python's standard library instead of
complex regular expressions:
- ip:
ipaddress.ip_address - url/uri:
urllib.parse.urlparse - mail:
email.utils.parseaddr - hash: length + hex digits check
- domain/fqdn/registry/user‑agent: simple heuristics aligned with the test suite
Migration (Breaking Changes)
- Import from the top-level package only:
- Before:
from sentineliqsdk.analyzer import Analyzer - After:
from sentineliqsdk import Analyzer
- Before:
- Removed legacy helpers:
getData,getParam,checkTlp,notSupported,unexpectedError. - Removed legacy config key:
config.auto_extract_artifacts(useconfig.auto_extract). - Removed legacy module paths:
sentineliqsdk.analyzer,sentineliqsdk.responder,sentineliqsdk.worker,sentineliqsdk.extractor(all exported at top-level instead).
Contributing
Prerequisites
-
Generate an SSH key and add the SSH key to your GitHub account.
-
Configure SSH to automatically load your SSH keys:
cat << EOF >> ~/.ssh/config Host * AddKeysToAgent yes IgnoreUnknown UseKeychain UseKeychain yes ForwardAgent yes EOF
-
Install VS Code and VS Code's Dev Containers extension. Alternatively, install PyCharm.
-
Optional: install a Nerd Font such as FiraCode Nerd Font and configure VS Code or PyCharm to use it.
Development environments
The following development environments are supported:
-
⭐️ GitHub Codespaces: click on Open in GitHub Codespaces to start developing in your browser.
-
⭐️ VS Code Dev Container (with container volume): click on Open in Dev Containers to clone this repository in a container volume and create a Dev Container with VS Code.
-
⭐️ uv: clone this repository and run the following from root of the repository:
# Create and install a virtual environment uv sync --python 3.13 --all-extras # Activate the virtual environment source .venv/bin/activate # Install the pre-commit hooks pre-commit install --install-hooks
-
VS Code Dev Container: clone this repository, open it with VS Code, and run Ctrl/⌘ + ⇧ + P → Dev Containers: Reopen in Container.
-
PyCharm Dev Container: clone this repository, open it with PyCharm, create a Dev Container with Mount Sources, and configure an existing Python interpreter at
/opt/venv/bin/python.
Developing
- This project follows the Conventional Commits standard to automate Semantic Versioning and Keep A Changelog with Commitizen.
- Run
poefrom within the development environment to print a list of Poe the Poet tasks available to run on this project. - Run tests with coverage:
poe test(writesreports/coverage.xmland shows a summary). - Run
uv add {package}from within the development environment to install a run time dependency and add it topyproject.tomlanduv.lock. Add--devto install a development dependency. - Run
uv sync --upgradefrom within the development environment to upgrade all dependencies to the latest versions allowed bypyproject.toml. Add--only-devto upgrade the development dependencies only. - Run
cz bumpto bump the package's version, update theCHANGELOG.md, and create a git tag. Then push the changes and the git tag withgit push origin main --tags.
Security and privacy
- Error payloads sanitize config keys containing any of:
key,password,secret,token. - You can override or extend this list via the
secret_phrasesparameter toWorker(...).
Metadata
Release files for sentineliqsdk 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sentineliqsdk-0.3.0.tar.gz | 171.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sentineliqsdk-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 246.2 kB
Release files / sentineliqsdk-0.3.0.tar.gz
| Download URL | sentineliqsdk-0.3.0.tar.gz |
|---|---|
| Size | 171.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7ebe3537f2fbd68637380658bf0f743e38e5d6ffa5e7ad7ad79e36bdd99e62e
|
|
BLAKE2b-256 checksum How to use checksums |
921128a723cfd42f159926de2c63df41af9e8cea7c757e5f16e0d56802c75e1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.15
|
Release files / sentineliqsdk-0.3.0-py3-none-any.whl
| Download URL | sentineliqsdk-0.3.0-py3-none-any.whl |
|---|---|
| Size | 74.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79db26c66f64a85190c6f01d767a29f606f6a2acf4c97f10408dad2cb7622dd1
|
|
BLAKE2b-256 checksum How to use checksums |
ef206bcf21451c099767d848db7f5583801a03f86e14c8437e9e243915dc159d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.15
|