Skip to content

Harden file serving, authentication, and multiplayer resource limits - #140

Merged
bashmohandes merged 1 commit into
masterfrom
review/security-performance-hardening
Oct 25, 2026
Merged

bashmohandes merged 1 commit into
masterfrom
review/security-performance-hardening

Conversation

@bashmohandes

Copy link
Copy Markdown
Owner

Private static files could be reached through encoded path aliases, and a malformed WebSocket frame could terminate the server. This change closes those paths, rejects credentials changed during asynchronous verification, throttles profile passcode checks, and prevents replaced tic-tac-toe sockets from mutating resumed matches.

All room sends now enforce a 1 MiB queued-byte ceiling while preserving unsent receipts for reconnect. Static caching has an 8 MiB LRU budget with streaming above 512 KiB. Save listings avoid unused state/image payloads; one local five-slot benchmark improved 300 listings from 169.4 ms to 16.3 ms. The service worker excludes encoded API paths, honors private/no-store responses, and purges the previous cache.

Validation: 359 tests pass on Node 26.12.1 with locked ws 8.22.0; npm run check and git diff --check pass; npm audit --omit=dev reports zero vulnerabilities. Live regressions cover malformed frames on every endpoint, encoded private paths, profile throttling, stale sockets, resume, and rematch. Browser interaction checks reported no console errors, but screenshot capture timed out. Docker is unavailable locally; the existing CI container scan remains required.

The prioritized findings, benchmark context, remaining mobile-layout/query optimizations, and review limits are documented in docs/security-review-2026-10-24.md. Existing ADRs describe the strengthened boundaries. No new dependencies or migrations.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T02:52:43.441718Z 19187a3 PR opened
🔒 Security Review ✅ Completed 2026-10-25T02:55:41.369380Z 19187a3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bashmohandes
bashmohandes merged commit d78100d into master Oct 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant