Skip to content

Only the agent's PTY child gets a scrubbed environment; the tray spawns children with the daemon's #4306

Done

Description

@mstomar125

Found while checking the Security posture design against the code (2026-11-19).

The design says every child process the daemon spawns runs with a scrubbed environment. Only the agent's PTY child does (packages/agent/src/pty/session.rs). The tray spawns ps, taskkill and the app without scrubbing (tray.rs, around lines 70, 138 and 801), so the daemon's environment, including variables that hold credentials, reaches those children.

Done when every process the daemon or tray spawns either goes through the same allow-list environment, or the design states which spawns are exempt and why, with a test that pins it. Changes under packages/agent need the agent owner's sign-off.

Activity

  1. self-assigned this
    on Nov 19, 2026
  2. mstomar125 commented on Nov 25, 2026

    @mstomar125
    ContributorAuthor

    Decision (owner, 2026-11-25): fix it in the small-fix batch before the next Sync release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions