algovoi-receipt-sentinel sits on top of the receipt verifier and webhook verifier. Feed it every verification result and it fires typed alerts when it detects attack patterns — replay bursts, tamper attempts, or scanning probes.
How it works
The sentinel maintains a per-source sliding window for each configured rule. When the number of matching failures inside the window reaches the threshold, aSentinelAlert is emitted and the counter resets.
Quick start
Default rules
Four rules ship by default. All are configurable.| Alert code | Watches | Threshold | Window |
|---|---|---|---|
TAMPER_DETECTED | INVALID_SIGNATURE, TAMPERED_SIGNATURE, INVALID_JWS_FORMAT | 5 | 60 s |
REPLAY_DETECTED | STALE_SIGNATURE | 3 | 120 s |
SCAN_DETECTED | MISSING_SIGNATURE, MISSING_ENVELOPE, MALFORMED_SIGNATURE | 10 | 30 s |
BURST_FAILURE | All error codes (catch-all) | 10 | 60 s |
Alert object
API reference
Python
TypeScript
Custom rules
Test results
| Implementation | Tests | Result |
|---|---|---|
| Python unit | 23 | 23/23 |
| Python vectors | 13 | 13/13 |
| TypeScript unit | 22 | 22/22 |
| TypeScript vectors | 13 | 13/13 |
8-language cross-validation
104/104 agreements — all 8 implementations produce identical alert decisions from the same event sequences.| Language | Result |
|---|---|
| Python | 13/13 |
| TypeScript | 13/13 |
| Go | 13/13 |
| Rust | 13/13 |
| Java | 13/13 |
| PHP | 13/13 |
| .NET | 13/13 |
| Ruby | 13/13 |
Vectors
13 fixtures invectors/ — 8 that fire alerts and 5 that stay quiet. Each is a self-contained JSON sequence of events with expected outcomes. Regenerate:
See also
- Webhook verifier — validates
X-AlgoVoi-Signatureheaders - Receipt verifier — validates JWS compliance receipts
- Notifications — webhook delivery and retry schedule
- Package suite — full open-source package listing