Skip to content

workflows: oversized args 被截断对象替换后仍继续执行 #175

Closed

Description

@tt-a1i

问题

extensions/workflows/sandbox.ts 把 workflow args 经过 lossy safeStringify 后再检查大小。超限输入会先被替换为一个截断说明对象,后续 size check 因此不可达,脚本继续执行,但拿到的已经不是调用者传入的 args。

这把“输入超限”静默改写成了“类型和语义完全不同的合法输入”,会导致 workflow 在错误参数上继续产生看似成功的结果。

期望

  • workflow args 使用完整、可证明有界的编码;超限时在脚本执行前 fail closed;
  • 不用 truncation stub 替换权威输入;
  • 错误明确报告原始 args 超过上限;
  • JSON string 与非 JSON raw string 都覆盖边界测试;
  • 恰好位于 byte/node/depth 上限的输入保持原样;超一字节不执行脚本;
  • replay identity、journal 与 model-facing error 不把 stub 当作真实 args。

Activity

  1. testikun commented on Aug 26, 2026

    @testikun
    Collaborator

    This was generated by AI during triage.

    I would like to take #175. I verified the failure path locally: oversized workflow args can be converted into a lossy truncation stub before the sandbox parses them, so the workflow may continue with altered or missing arguments. I will keep the fix focused on fail-closed complete argument encoding and regression coverage; no implementation has started yet.

  2. added a commit that references this issue on Aug 26, 2026
    da2836f
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions