Official Python client for the BJHUNT Enterprise API
Project description
bjhunt (Python)
Official Python client for the BJHUNT Enterprise API. Standard library only — no third-party dependencies.
The API is available on the Enterprise plan only. Create an API key from the dashboard → Settings → API Keys (shown once, starts with
bjh_).
Install
pip install bjhunt
Quickstart
import os, time
from bjhunt import BjhuntClient
bj = BjhuntClient(api_key=os.environ["BJHUNT_API_KEY"])
# Launch an autonomous audit.
scan = bj.scans.create(
target="https://acme.example.com",
compliances_required=["owasp-asvs-5", "pci-dss-v4"],
)
scan_id = scan["scanId"]
# Poll for completion (or subscribe to the scan.completed webhook).
while bj.scans.get(scan_id)["scan"]["status"] in ("pending", "running"):
time.sleep(10)
findings = bj.scans.findings(scan_id, severity="critical")["findings"]
report = bj.scans.report(scan_id, fmt="md")
API
scans.create(target, scope=None, compliances_required=None, model=None, report_languages=None, asvs_target_level=None, kind=None, prompt=None)scans.list(status=None, limit=50, offset=0)scans.get(scan_id)scans.findings(scan_id, severity=None, limit=100, offset=0)scans.report(scan_id, compliance=None, fmt="md")→ report textscans.delete(scan_id)
Errors raise BjhuntApiError with .status, .message, .code.
Webhooks
Verify the X-BJHUNT-Signature header against the raw request body:
from bjhunt import parse_webhook
event = parse_webhook(raw_body_bytes, request.headers.get("X-BJHUNT-Signature"), WEBHOOK_SECRET)
if event["event"] == "scan.completed":
...
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 bjhunt-1.0.0.tar.gz.
File metadata
- Download URL: bjhunt-1.0.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
374fe3823c85bc6290917bc9eb07f5f32ba4c1abe6b56cf07fd6d610e063a925
|
|
| MD5 |
29b94dd3f6ded7a5c140ccc3d61e178d
|
|
| BLAKE2b-256 |
78d0438573b6ffb7a4a42c966349c6ed9febf9e3a53c1f3ce1b4d711ffb17b43
|
File details
Details for the file bjhunt-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bjhunt-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb5e5a4691eec5ce3d3272dd7068be390fb8cbaa4738bd371dfebd0759fce82f
|
|
| MD5 |
374ac8a31f098f3dc56078a2bc023d74
|
|
| BLAKE2b-256 |
4aee7dd2ee8558b7c6f24c0306d387d70b914285337dcf080db2156da58078bf
|