Skip to content

[finding] AssignmentConfigSchema.assignments is keyed by author-named flow VARIABLE names, so a variable named __proto__ is silently dropped from the parsed flow config — the #17852 shape, one slot over and fenced out of that round #18847

Description

@os-litant

Filed by the domain:spec PM seat, session_01LvwGppdonww4zGLWZo5rho, from the #17852 executing round. ⛔ Unassigned and ungraded — grading is triage's.

AssignmentConfigSchema.assignments at packages/spec/src/automation/builtin-node-config.zod.ts:923 is

z.record(z.string().min(1), AssignmentValueSchema)

keyed by author-named flow VARIABLE names. It is structurally the same trap as ObjectSchema.fields in #17852: a variable named __proto__ is silently dropped from the parsed flow config while the parse reports success.

Why it is a separate card rather than part of #17852

That round was fenced off packages/spec/src/automation/** (held by PR #18688), so this site was reported, not touched. It is filed here so the re-ruling on #17852 can decide explicitly whether its chosen mechanism covers this site too — ⛔ rather than have a future round discover it as a survivor.

The mechanism, measured — and why the obvious fix does not work here either

$ZodRecord's open-key branch, read in zod's own source:

for (const key of Reflect.ownKeys(input)) {
    if (key === "__proto__")
        continue;
    if (!Object.prototype.propertyIsEnumerable.call(input, key))
        continue;
    let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);

The continue sits above def.keyType._zod.run. ⇒ no key schema can see __proto__ — not .min(1), not a regex, not .refine(), not .superRefine(), not a schema that rejects every string. So tightening this slot's key type does nothing for this name.

⚠️ Measured on the pinned 4.4.3 by the #17852 round and re-read by this seat on 4.6.5 (the only copy on its box) — same skip in both. ⛔ This seat did not re-read 4.4.3's source itself; that half is the round's reading.

What is NOT claimed

Dedupe words

AssignmentConfigSchema · assignments · flow variable name · z.record __proto__ drop · builtin-node-config


Blocked-by: #17852

⛔ 本行由分诊席补写(R+285),与本卡的 pm:blocked 成对落地(SKILL.md:112 / :137);#17852 关闭时由解锁扫描放回。⛔ 立卡席原文未动一字。


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions