Skip to content

Discard pending exec input when access or sign-in is revoked #479

Done

Description

@samuelmbabhazi

Hardening opportunity

Ending a relay session does not purge queued browser frames. The agent iterator drains the queue before noticing the ended state and yielding the final kill/close frame. For revocation-related endings, previously queued stdin can therefore be delivered before termination.

Priority: P3 hardening, from the 2026-11-25 audit of main 1295e534d7a1c3cd0a492449de8806aa532a4924. Related feature: #232.

Evidence and limits

  • fromBrowser correctly refuses new frames once the session has ended.
  • toAgent shifts queued frames before checking ended.
  • end sets the ending state but does not clear that queue.

A bounded unit probe queued stdin, ended the session with access_removed, and observed stdin followed by the kill/close frame. The input was accepted while authorization was still valid. This is not evidence that a revoked user can submit fresh commands or that bytes already delivered to a container can be recalled.

Acceptance criteria

  • Define the handling of pending stdin/resize frames for access_removed, signed_out and other forced endings.
  • On revocation/sign-out, discard pending input that has not yet been delivered and prioritize the terminal close/kill frame.
  • Tests verify that new input remains refused, queued input is discarded for forced endings, the iterator wakes, and termination/audit happens once.
  • Preserve explicitly intended behavior for normal process exit and user-requested close.

Activity

  1. added
    enhancement
    priority:P3
    on Nov 25, 2026
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

    enhancementpriority:P3securitytrack:control-plane

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions