Skip to content

Agent-box log directory is a shared /tmp path: decide the per-user layout #3682

Open

Description

@hsinatfootprintai

Question (owner decision needed)

`internal/agentbox/process.go` (`DefaultLogDir = "/tmp/agent-box"`) and `internal/coderun/ops.go` (`RunLogDir = "/tmp/agent-box"`) write run logs to one shared, predictable directory in `/tmp`. Clients may read that path, so a different tenant can see another tenant's log, and a planted symlink there is followed.

Options:

  • A. Keep the path, add a per-user subdirectory (created 0700 and owned by that user).
  • B. Move to a per-run directory from `mktemp -d`, and return the path to the caller.
  • C. Keep the path but make the directory root-owned, 0755, and mark clients as read-only. Smallest; keeps client reads of the shared path.

Default if no answer: A.

Acceptance criteria (after the decision)

  • Logs for one user are not readable by another user.
  • Test: the directory is created with the chosen mode and owner; a symlink planted at the path is refused.

Parked on #3634; follow-up to #3342.

Blocked by: none
Sprint: #3725
Part of #3725

Activity

  1. added
    securitySecurity hardening / defensive features
    model:sonnetRoute to Sonnet — mechanical, fully specified
    needs-decisionWaiting on a human decision — not implementable until answered
    size:SAgent build time under ~1h
    runtime:claudeWork runs under the Claude Code CLI (default)
    phase-2-optimizeSprint phase 2: improves the flow, not required for it to work
    on Nov 12, 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

    model:sonnetRoute to Sonnet — mechanical, fully specifiedneeds-decisionWaiting on a human decision — not implementable until answeredphase-2-optimizeSprint phase 2: improves the flow, not required for it to workruntime:claudeWork runs under the Claude Code CLI (default)securitySecurity hardening / defensive featuressize:SAgent build time under ~1h

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions