Skip to content

P3: Bound invalid socket-message logging #376

Description

@lovasoa

Audit priority: P3.

Invalid socket-message logging serializes raw hostile payloads.

Refs:

What happens:

Rejected socket messages are logged with message: data, and non-scalar log attributes are stringified. This happens on the boundary rejection path, before the payload has a trusted shape.

Why this matters:

  • Malformed input can drive avoidable allocation and log volume.
  • The issue is secondary because normal message shapes have validation limits, but arbitrary invalid objects can still hit this path repeatedly.

Recommended direction:

  • Log bounded metadata only: rejection reason, tool/type tags, approximate payload size, socket id, board, and client IP.
  • Avoid logging the full raw message object for invalid socket payloads.
  • Add a regression test for oversized/malformed invalid payloads that verifies bounded logs.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions