feat: implement Webhook falsification tests (T1-T4)#183
Open
sayanget wants to merge 1 commit intoScottcjn:mainfrom
Open
feat: implement Webhook falsification tests (T1-T4)#183sayanget wants to merge 1 commit intoScottcjn:mainfrom
sayanget wants to merge 1 commit intoScottcjn:mainfrom
Conversation
FlintLeng
reviewed
Apr 18, 2026
FlintLeng
left a comment
There was a problem hiding this comment.
Code Review
Clean test implementation. ✅
What's Good
- Well-structured test file covering T1-T4 as specified in BEACON_MECHANISM_TEST.md
- Replay (T1), Tamper (T2), Stale/Future (T3), Valid once (T4) — all security invariants tested
- No deletions — clean additive PR
- Matches the specification exactly
Verdict
Exactly what the bounty asked for. The tests are comprehensive and follow the spec. ✅ Approve and merge.
This was referenced Apr 18, 2026
FlintLeng
reviewed
Apr 19, 2026
FlintLeng
left a comment
There was a problem hiding this comment.
Code Review
Webhook falsification test suite (T1-T4). ✅
Assessment
- 99 additions, 1 file — clean test implementation
- Covers 4 critical security invariants:
- T1: Replay protection (same nonce rejected)
- T2: Tamper detection (modified payload rejected)
- T3: Stale/Future timestamp rejection (±15 min window)
- T4: Valid-then-replay sequence
- Follows spec in docs/BEACON_MECHANISM_TEST.md
Positives
- Test-first approach for security invariants is excellent
- Each test is clearly labeled and maps to spec
- No production code changes — pure test coverage addition
Minor
- Could add T5 for missing signature (not just invalid signature)
- Could add edge case for exactly 15min boundary
Security testing is critical for Beacon. Recommended merge. ✅
fengqiankun6-sudo
approved these changes
Apr 20, 2026
fengqiankun6-sudo
left a comment
There was a problem hiding this comment.
Good implementation of webhook falsification tests (T1-T4)!
The test coverage approach ensures the webhook transport is reliable under various conditions.
LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the official falsification test suite for the Webhook transport as specified in
docs/BEACON_MECHANISM_TEST.md.Tests included:
replay_nonce.signature_invalid.These tests ensure Webhook ingress is compliant with Beacon security invariants.