Skip to content

Merge release/1.2.2 into main (GHSA-cpmp-67wf-gwmx) - #100

Merged
cuihtlauac merged 6 commits into
mainfrom
merge/release-1.2.2
Nov 21, 2026
Merged

cuihtlauac merged 6 commits into
mainfrom
merge/release-1.2.2

Conversation

@cuihtlauac

Copy link
Copy Markdown
Member

Back-merges the 1.2.2 security release (published advisory GHSA-cpmp-67wf-gwmx) into main.

What comes over

  • Approval terminal check (src/ttyguard.rs): the daemon refuses to start in a terminal that other same-UID processes can type into: tmux/screen/zellij, kitty/WezTerm/Konsole remote control, VS Code and Emacs terminals, X11 without Wayland. --allow-injectable-tty overrides it and puts a warning line in every prompt. There is deliberately no hosts.json equivalent, because an agent can write that file. With --host, the check runs locally before ssh, and the flag is forwarded next to --no-shell. --pkexec skips the check.
  • No controlling terminal for unprivileged children: run_one uses setsid for unescalated leaves, so they cannot TIOCSTI into a later prompt. Escalated leaves keep setpgid and the foreground hand-off.
  • MCP launcher: removes the launcher's own terminal variables from the window it spawns. If the daemon refuses, the window stays open until Enter, and the start_server error explains what to do.
  • Docs: threat-model B3 row and leaf 3.5, assurance-case A1, security/usage/install/README/testing.
  • Version bumped to 1.2.2.

What does not

Port notes

Conflicts were resolved by taking main's version of executor.rs, gui.rs, tui.rs, sudo-proxy.rs, security.md, usage.md and changelog.md, then re-applying the GHSA changes by hand. git diff origin/main --stat lists only GHSA and version files.

Tests

  • New: tests/pty_injectable_tty.rs (warning line in every prompt; PtyOpts gains env); ttyguard unit tests; tests/cli.rs refusal/override/--host tests; unprivileged_child_has_no_controlling_terminal in tests/exec.rs.
  • cargo test --release --no-fail-fast: all binaries green. Clippy clean, and both builds (default and --no-default-features) succeed.

🤖 Generated with Claude Code

cuihtlauac and others added 6 commits November 21, 2026 10:46
…80)

The prompt resolved argv[0] on the daemon's PATH while the executor spawned
the bare name with a cleared environment, so the child looked it up again on
a different PATH (login PATH, sudo's secure_path, sh for pkexec pipelines).
A daemon started from a dev shell could show one file and run another.

Resolve argv[0] once with executor::resolve_command (child's PATH; names
with '/' relative to the child cwd '/'), display that in the TUI and GUI,
and spawn it on every path: directly with the requested argv[0] kept,
after sudo/pkexec, and in the pkexec sh -c string. Unresolved names are
refused with "command not found" before any pipeline stage spawns.

Re-applied by hand to the 1.2 pipeline executor: main's #80 targets the
structured-plan executor and does not cherry-pick onto v1.2.1. Fixes #62.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cuihtlauac ALVARADO <cuihtlauac@tarides.com>
GHSA-cpmp-67wf-gwmx. The daemon approves by reading one key from its
terminal and cannot tell a key typed by the human from one injected by a
same-UID process, and the usual requester (an AI agent) has a same-UID
shell. Under tmux/screen, kitty/wezterm/Konsole remote control, or X11 it
could answer its own privileged prompt.

- New ttyguard module: detect multiplexers, remote-control emulators,
  VS Code / Emacs terminals and X11-without-Wayland from the environment.
  The daemon refuses to start in such a terminal unless started with
  --allow-injectable-tty, which adds a warning line to every prompt. No
  hosts.json equivalent: an agent can write that file and restart the
  daemon via MCP. Skipped under --pkexec. Legacy TIOCSTI is a warning.
- --host checks the local terminal before ssh and forwards the override.
- Unprivileged children run in their own session (setsid), so they have
  no controlling terminal and cannot TIOCSTI into a later prompt.
- sudo-proxy-mcp scrubs the launcher's terminal variables from the window
  it spawns, holds the window open on refusal, and explains the failure.
- Threat model (B3 row, leaf 3.5, residuals), assurance-case A1, user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cuihtlauac ALVARADO <cuihtlauac@tarides.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cuihtlauac ALVARADO <cuihtlauac@tarides.com>
- tokio 1.49 -> 1.54.1 (RUSTSEC-2026-0386, unsound AsyncFd constructors);
  the requirement floor is raised to 1.54 so the lockfile can't regress.
- futures-util 0.3.31 -> 0.3.34, which drops the unmaintained pin-utils
  (RUSTSEC-2026-0441).
- Ignore RUSTSEC-2026-0462 in deny.toml and the cargo audit step: it is
  unbounded body buffering in rmcp's Streamable HTTP *clients*, and
  sudo-proxy enables only rmcp's stdio `transport-io`. The real fix is
  rmcp >= 3.9.0, a major-version upgrade left for a separate change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 20ab260)
Signed-off-by: Cuihtlauac ALVARADO <cuihtlauac@tarides.com>
A new informational advisory marks every chrono version unmaintained, and
deny.toml denies unmaintained crates, so the cargo deny job failed on every
PR. chrono is pulled in only by the mcp feature: rmcp depends on it
unconditionally and enables schemars' chrono04. rmcp 3.11 still requires
it, so upgrading does not remove it.

Ignore the advisory ID with a rationale in deny.toml and mirror it in the
cargo audit step. A future chrono vulnerability advisory has its own ID and
still fails the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cuihtlauac ALVARADO <cuihtlauac@tarides.com>
(cherry picked from commit 4e3cca0)
Signed-off-by: Cuihtlauac ALVARADO <cuihtlauac@tarides.com>
Brings the GHSA-cpmp-67wf-gwmx fix to main, ported onto the plan executor,
no-shell, audit and PTY harness code:

- ttyguard startup check and --allow-injectable-tty (also forwarded with
  --host next to --no-shell); prompt warning line in write_request_header.
- Unprivileged leaves in run_one get setsid (no controlling terminal);
  escalated leaves keep setpgid + the foreground hand-off.
- MCP launcher scrubs the launcher's terminal variables.
- New PTY test pty_injectable_tty.rs (PtyOpts gains `env`); docs incl.
  testing.md.

Main's own #80 is kept: the release branch's backport (b196b68) is
superseded, and the dependency commits were already on main. Version 1.2.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cuihtlauac ALVARADO <cuihtlauac@tarides.com>
@cuihtlauac
cuihtlauac merged commit 63eb5a7 into main Nov 21, 2026
16 checks passed
@cuihtlauac
cuihtlauac deleted the merge/release-1.2.2 branch November 21, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant