Skip to content

Minimize avoidable chat and signaling metadata disclosure - #509

Draft
muke1908 with Copilot wants to merge 2 commits into
masterfrom
copilot/audit-minimize-metadata-leakage
Draft

muke1908 with Copilot wants to merge 2 commits into
masterfrom
copilot/audit-minimize-metadata-leakage

Conversation

Copilot AI commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Reduce plaintext metadata exposed by chat and signaling without breaking existing payload contracts. Document what remains visible despite E2EE.

  • Count-only presence: Add getParticipantCount() and countOnly=true; migrate UI presence checks and SDK call preconditions. Preserve the legacy identity-list API and accept older servers’ list responses.
  • Payload and log minimization: Explicitly select join fields and envelope headers (version, strategy, data), preserving opaque strategy data. Remove identifiers from join/channel diagnostics.
  • Contract coverage: Add exact-field assertions for socket payloads, relay acknowledgments, count-only responses, legacy compatibility, and identifier-free logging.
  • Privacy documentation: Record the before/after inventory, remaining routing and traffic-pattern exposure, ephemeral-ID guidance, and optional authenticated-padding trade-offs.
const count = await chat.getParticipantCount(); // No participant IDs requested

Co-authored-by: muke1908 <20297989+muke1908@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI changed the title [WIP] Audit and minimize avoidable metadata leakage Minimize avoidable chat and signaling metadata disclosure Sep 11, 2026
Copilot AI requested a review from muke1908 September 11, 2026 20:41
@muke1908
muke1908 requested a lite review from Copilot September 23, 2026 05:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

A moderate privacy issue remains because relay-visible IDs use Math.random() instead of a CSPRNG.

Review effort: Lite
Findings: None

What changed in this PR

This PR reduces chat and signaling metadata exposure while preserving legacy APIs and documenting remaining E2EE metadata visibility.

Changes:

  • Adds count-only participant presence with legacy compatibility.
  • Minimizes socket payloads and identifier-bearing diagnostics.
  • Adds contract tests and privacy documentation.
File Description
service/​src/​socket/​socket.ts Minimizes socket payload fields.
service/​src/​socket/​socket.test.ts Tests payload and logging contracts.
service/​src/​sdk.ts Adds count-based presence checks.
service/​src/​sdk.test.ts Tests count usage and privacy logging.
service/​src/​public/​types.ts Exposes participant-count API.
service/​src/​api/​messages.ts Implements count-only requests and fallback.
service/​src/​api/​messages.test.ts Tests count and compatibility behavior.
service/​README.md Documents SDK privacy behavior.
README.md Documents metadata limitations.
client/​src/​context/​ChatContext.tsx Uses count-only presence checks.
backend/​socket.io/​listeners.ts Removes room identifiers from diagnostics.
backend/​socket.io/​listeners.test.ts Tests relay and logging contracts.
backend/​README.md Adds metadata inventory and privacy guidance.
backend/​api/​messaging/​index.ts Supports count-only responses.
backend/​api/​messaging/​index.test.ts Tests count and compatibility behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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.

Audit and minimize avoidable metadata leakage

3 participants