Skip to content

fix(protocol): require an absolute codexHome in Reply-To URIs #53

Closed

Description

@abruption

What happened

Security and stability hardening audit finding TS-05 / Low (2026-09-28). Priority is an audit recommendation, not a claim of a production incident.

A Reply-To URI used as --to may carry codexHome, which becomes the explicit --codex-home. The TypeScript parser does not require it to be absolute. codexHome=rel/dir and codexHome=~/.codex are accepted and later resolved against the replier's working directory (or the remote login directory over SSH) instead of the sender's home.

The Python v1 reference rejects this: "Reply-To codexHome must be an absolute path" (POSIX or Windows absolute).

What you expected

codexHome in a Reply-To URI is accepted only as an absolute POSIX or Windows path; a leading ~ is refused, matching the Python contract.

Environment

  • Baseline: published session-peer 0.2.0 (npm latest), repository commit 38a1300369443e064f58bb18e8bda70f31af0fbb.
  • Audit environment: macOS arm64, Node 22.14.0.
  • No live message tests or production mutation.
  • Reproduction: argument parsing with a synthetic HOME; nothing was sent.

Source evidence

Acceptance criteria

  • Relative and ~-prefixed codexHome values are refused with invalid_reply_uri.
  • Conformance fixture case shared with the Python reference.

Scope and limitations

The selected home is still subject to live-writer verification, so the impact is a confusing refusal or a wrong home candidate rather than silent delivery elsewhere. Parity gap with the Python v1 contract.

Checked

  • Searched existing issues in this repository and in abruption/session-peer for duplicates.
  • Removed credentials, conversation contents, private paths and real device/session identifiers.
  • Used isolated fixtures without weakening inbound permissions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions