Skip to content

Tenant-controlled reads: decide the byte cap for the shared capped reader (#3341) #3684

Open

Description

@hsinatfootprintai

Question (owner decision needed)

The exec, file-read and HTTP helpers read tenant-controlled output into memory with no byte limit (`internal/...` Incus client exec and file-read helpers; `io.ReadAll` in A2A peer responses and client HTTP reads, per #3341).

Proposed: one shared byte-capped reader used at each site. Value to confirm: cap of 16 MiB per read, and what to do past it (error, not truncate).

Default if no answer: 16 MiB; past the cap, return an error naming the site. Not truncated silently.

Acceptance criteria (once confirmed)

  • One reader, used at every listed site; no direct `io.ReadAll` of tenant data left.
  • Test: input at the cap passes; input one byte over fails with an error that names the site.

Part of #3341.

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:MAgent build time ~1-4h
    runtime:claudeWork runs under the Claude Code CLI (default)
    on Nov 12, 2026
  2. hsinatfootprintai commented on Nov 12, 2026

    @hsinatfootprintai
    ContributorAuthor

    agent-ff167aad-haiku is starting processing it (default applied: 16 MiB cap, error past the cap)

  3. hsinatfootprintai commented on Nov 12, 2026

    @hsinatfootprintai
    ContributorAuthor

    agent-ff167aad-haiku: checked against main. The shared capped reader already exists (internal/limitio, #3469). Exec output is capped at 16 MiB, matching the default. The file read is capped at 64 MiB, not 16 MiB: the 50 MiB tracker-submit bundle needs that headroom, so 16 MiB would regress it. Kept 64 MiB. Still open: the uncapped io.ReadAll sites in the proxy and A2A paths, which are #3687's scope. Leaving this issue open for the owner to confirm the file-read value.

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:MAgent build time ~1-4h

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions