mirror of
https://github.com/block/buzz.git
synced 2026-10-27 12:40:30 +00:00
Verify ACP relay events before prompt routing (#7010)
## What changed Verify every Nostr EVENT received by buzz-acp immediately after deserialization. Events with an invalid NIP-01 ID or Schnorr signature are dropped before subscription routing, deduplication, replay-watermark updates, membership handling, or either harness queue. ## Safety Signature verification runs on the blocking pool so cryptographic work does not block the relay task. A verification failure drops only that event and keeps the connection available for subsequent valid traffic. The existing observer-control verification remains as defense in depth. Regression tests cover valid delivery; changed content, ID, signature, pubkey, tags, and timestamp; a forged owner shutdown command with a recomputed ID; forged membership notifications; and forged observer-control events. ## Testing cargo test -p buzz-acp cargo clippy -p buzz-acp --all-targets -- -D warnings just ci --------- Signed-off-by: Jordan Mecom <jm@squareup.com>
This commit is contained in:
@@ -90,6 +90,11 @@ run_unit_tests() {
|
||||
run_test_step "buzz-cli tests" \
|
||||
cargo test -p buzz-cli -- --nocapture
|
||||
|
||||
# Keep the relay-to-agent trust-boundary regressions in the fallback path
|
||||
# when cargo-nextest is unavailable.
|
||||
run_test_step "buzz-acp tests" \
|
||||
cargo test -p buzz-acp -- --nocapture
|
||||
|
||||
# buzz-db migrator/lint unit tests (no infra): guard the embedded-migrator
|
||||
# invariant (exactly the consolidated 0001; cutover/backfill stays an operator
|
||||
# script, not startup state) and the tenant-scoping lints. The Postgres-backed
|
||||
|
||||
Reference in New Issue
Block a user