Fix P1/P2 security findings from adversarial review#7
Open
hashd wants to merge 6 commits into
Open
Conversation
…validation - Filter struck set per-ticket in prize claims to prevent cross-ticket fraud (#1) - Filter prize progress per-ticket to prevent cross-ticket info leak (#9) - Strip join_secret from sanitized state (#2) - Filter REST show endpoint to only return requesting user's data (#3) - Filter player_tickets_updated broadcast to target user only (#4) - Add chat text length limit (500 chars) and validation (#13) - Add reaction emoji allowlist (#14) - Add max players per game limit (100) (#11) - Add input validation for game creation params (#23) - Remove inspect(reason) from error responses (#22) - Store rich metadata in Registry for O(1) game listing
- Don't auto-register unknown emails on magic link request (#7) - Atomic token delete in verify_magic_link to prevent replay (#8) - Add delete_api_token/1 and revoke bearer token on logout (#21) - Return opaque message on magic link request (don't reveal email existence)
- Wrap create_game in transaction for atomicity (#16) - Limit active games per user to 5 (#11) - Optimize list_public_games to read Registry metadata instead of O(n) GenServer calls (#12) - Expand code space from ~25K to ~250K (3-digit numbers) (#10) - Optimize monitor to use Registry metadata instead of GenServer.call (#18) - Fix rate limit TOCTOU with atomic ETS increment (#17) - Configure CORS with explicit origins (#19)
- Update code format tests for WORD-NNN (3-digit) format
- Update magic link tests for new {:ok, token, record} return type
…imer - Move all Repo calls in GenServer to Task.start to avoid blocking (#15) - Cancel existing host disconnect timer before setting a new one (#25) - Reject start_game with zero players (#27) - Use deterministic sort instead of shuffle in Board.from_snapshot (#28)
- Move token from localStorage to sessionStorage to limit exposure (#5) - Enforce requiresHost route guard with server-side check (#20) - Compensate for client/server clock skew in countdown timer (#34)
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.
Summary
Addresses 23 findings (P1 critical + P2 significant) from the adversarial security review.
P1 Critical fixes
P2 Significant fixes
Test plan
mix test— 127 tests pass (2 properties + 125 tests, 0 failures)