Stitch any CI into Tangled

buildkite: enforce freshness window on webhook signatures master

VerifySignature previously accepted any cryptographically valid "timestamp=<unix>,signature=<hex>" header regardless of how old the timestamp was. An attacker who captured a single signed delivery could replay it indefinitely, creating duplicate status events and unbounded growth in the events table. Reject signatures whose timestamp is more than MaxSignatureAge (5 minutes) from the local clock in either direction. The symmetric bound also defeats implausibly future-dated stamps that would otherwise mint a long replay window. The clock is read through a package-level timeNow var so tests can pin it deterministically; the existing fixed-timestamp test now stubs the clock and a new stale case covers the rejection path.


Author Mitchell Hashimoto Committer Tangled Date Commit c3035867 Parent 2f0eda45 Change ID xyskkqmv
+55 -11
2 changed files