cl/sentinel: reject invalid ping and status requests - #23579
Conversation
awskii
left a comment
There was a problem hiding this comment.
Four files here also change in #23577 — ssz_snappy/encoding.go, handlers/heartbeats.go, handlers/rate_limiter_integration_test.go, sentinel_requests_test.go — and its encoding.go edits land in the same functions this PR rewrites. Whichever merges second rebases onto the other.
There was a problem hiding this comment.
Pull request overview
Rejects malformed Ping and Status requests in Caplin’s SSZ-Snappy handlers.
Changes:
- Adds fixed-size request decoding and invalid-request responses.
- Bounds compressed input and checks trailing data.
- Expands handler and lifecycle tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
cl/sentinel/sentinel_requests_test.go |
Closes request writes before reading responses. |
cl/sentinel/handlers/rate_limiter_integration_test.go |
Sends valid Ping requests in rate-limit tests. |
cl/sentinel/handlers/heartbeats.go |
Validates Ping and Status request bodies. |
cl/sentinel/handlers/heartbeats_test.go |
Tests valid and malformed requests. |
cl/sentinel/communication/ssz_snappy/encoding.go |
Adds exact-size, bounded decoding. |
cl/sentinel/communication/ssz_snappy/encoding_test.go |
Tests compressed limits and trailing frames. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
3da4ce7 to
54e9d5f
Compare
yperbasis
left a comment
There was a problem hiding this comment.
Two protocol-boundary issues remain in the exact SSZ-Snappy decoder.
Summary
Closes #23166.
Testing