Skip to content

Terminal edges from the #322 review: job-control groups, secret fields split across reads #328

Closed

Description

@lydakis

These are two Codex findings on #322, logged here so the PR can merge, per the "merge when green, log findings" rule.

  1. Job-control groups outlive a terminal's kill. An interactive shell with job control (for example bash -i) puts each foreground job in its own process group. kill, pruning and daemon shutdown signal only the terminal's first group, so a job that also ignores SIGHUP keeps running after the terminal reports that it ended. Any command that leaves its group can already do the same with an ordinary shell call. Possible fixes are to kill every group in the terminal's session (walk /proc, or use TIOCGPGRP before the kill) or to run the terminal in a cgroup.
  2. Secret-field redaction across reads. The heuristic field redactor (password=…, api_key: …) sees each read on its own. If password= arrives in one read and the value in the next, the value is shown. Registered credentials are already held back across reads (Credentials::unfinished). Fields could get the same treatment by holding back a trailing secret-field name and separator until the value's end arrives.

Metadata

Metadata

Assignees

No one assigned

    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