You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PTY child process inherits the daemon environment unsanitized #1521
Spawned PTY agent CLIs inherit the daemon full environment with no env_clear or allowlist, so any secrets present in the daemon environment are visible to third-party agent CLIs.
Problem Statement
The spawn is injection-safe (no shell, prompt is a single argv entry), but the child sees the whole environment. Low risk under single-user-local, but unnecessary exposure.
Proposed Solution
env_clear() then pass an explicit allowlist (HOME, PATH, TERM, and per-agent auth vars) to the spawned process.
Acceptance Criteria
PTY children receive an explicit environment allowlist, not the full inherited env
July 2026 review: the PTY path is now confirmed done (env_clear() + allowlist at both PTY spawn sites, tested). One spawn site remains unscrubbed — the tray UI-binary spawn at packages/daemon/src/tray.rs:284 (Command::new(path).spawn(), no env_clear()). Please extend this issue to cover that site, or close if you'd prefer it tracked separately.
Activity
malibio commentedon Jul 6, 2026
Baseline — Frontend: 147 test files / 3948 tests passed (44s)
PTY child process inherits the daemon environment unsanitized (#1554)
malibio commentedon Jul 23, 2026
July 2026 review: the PTY path is now confirmed done (
env_clear()+ allowlist at both PTY spawn sites, tested). One spawn site remains unscrubbed — the tray UI-binary spawn atpackages/daemon/src/tray.rs:284(Command::new(path).spawn(), noenv_clear()). Please extend this issue to cover that site, or close if you'd prefer it tracked separately.