Secure heartbeat client for the Nuclei monitoring ecosystem
Project description
hb-client
A secure, high-reliability heartbeat client for monitoring your systems
using hbserver and hbwatcher.
Project Scope
This repository contains only the Python client library and CLI for sending heartbeat packets and managing local enrollment keys.
Related repositories:
hbserver(hb_backend): API/authentication and key lifecycle serviceshbwatcher(hb_watcher): monitoring process that evaluates heartbeat data
Installation
pip install hb-client
See MIGRATION.md if upgrading from older distribution or config paths.
This installs:
- the Python package
hb_client - the CLI command
hbclient
Quick Start
As a library
from hb_client import HbClient, HbConfig
config = HbConfig(server="hb.example.com", serverport=8333)
client = HbClient(name="my-service", interval=60, config=config)
client.send(task="deployment-complete")
client.close()
From the CLI
hbclient --server-url https://hb.example.com:8333 login
hbclient --server-url https://hb.example.com:8333 status
hbclient send --app my-service --task deploy --interval 60
Features
- AES-GCM encrypted UDP transport with CRC32 integrity
- OAuth Device Flow for key management
- Secure by default with
strict_security=True - Transparent DNS resolution with configurable refresh intervals
- Deterministic key rotation with jitter to prevent thundering herd
- Atomic file I/O for crash-safe credential storage
- Human-readable duration parsing (e.g.,
6h,2.5d,3w)
Configuration
Enrollment keys are stored under:
- Linux:
$XDG_CONFIG_HOME/hbclient/or~/.config/hbclient/ - macOS:
~/Library/Application Support/hbclient/ - Windows:
%APPDATA%/hbclient/
Security Mode (strict_security)
HbClient accepts strict_security (default: True). If enrollment is missing, construction raises RuntimeError with guidance to run:
hbclient --server-url https://hb.example.com:8333 login
CLI Reference
hbclient [--server SERVER] [--serverport PORT] [--server-url URL] COMMAND
Development
pip install -e ".[dev]"
make test
make pre-release
Releasing
pip install -e ".[release]"
cz bump
make pre-release
python -m twine upload dist/hb_client-<version>*
License
Apache-2.0 — see LICENSE
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 hb_client-0.5.5.tar.gz.
File metadata
- Download URL: hb_client-0.5.5.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
125cef805ff92a29d9e0cc9d412e060ff5fa686a0956807497a3e386e72b6b22
|
|
| MD5 |
e5e554e8f887bb535d843eb536340bc2
|
|
| BLAKE2b-256 |
779c9d6b3419eae8911331dc3e68054d4314c7ff53f52076338698ce0a20c560
|
Provenance
The following attestation bundles were made for hb_client-0.5.5.tar.gz:
Publisher:
release.yml on willp/heartbeat-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hb_client-0.5.5.tar.gz -
Subject digest:
125cef805ff92a29d9e0cc9d412e060ff5fa686a0956807497a3e386e72b6b22 - Sigstore transparency entry: 1962118602
- Sigstore integration time:
-
Permalink:
willp/heartbeat-client@37adc4b1152de08548bff3401d70c3fab3230778 -
Branch / Tag:
refs/tags/0.5.5 - Owner: https://github.com/willp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@37adc4b1152de08548bff3401d70c3fab3230778 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hb_client-0.5.5-py3-none-any.whl.
File metadata
- Download URL: hb_client-0.5.5-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a982b5192ced3c490e1b363659a97a6b5ac990a3a4d2bc2426fbd20807168f32
|
|
| MD5 |
31ebf7ad0f5781e5299034ac01c9296b
|
|
| BLAKE2b-256 |
b619fda137f6f60eb62bb49e4bf75181be45299f70d50533935db372a9c392c4
|
Provenance
The following attestation bundles were made for hb_client-0.5.5-py3-none-any.whl:
Publisher:
release.yml on willp/heartbeat-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hb_client-0.5.5-py3-none-any.whl -
Subject digest:
a982b5192ced3c490e1b363659a97a6b5ac990a3a4d2bc2426fbd20807168f32 - Sigstore transparency entry: 1962118698
- Sigstore integration time:
-
Permalink:
willp/heartbeat-client@37adc4b1152de08548bff3401d70c3fab3230778 -
Branch / Tag:
refs/tags/0.5.5 - Owner: https://github.com/willp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@37adc4b1152de08548bff3401d70c3fab3230778 -
Trigger Event:
push
-
Statement type: