Skip to content

fix(reliability): fail closed on malformed canonical encoding options #223

Description

@seonghobae

Current authoritative state

The original ownership statement is superseded. Draft PR #178 is closed/unmerged and explicitly records that consolidated Draft #176 is now the sole active writer for the overlapping canonical-envelope / Markdown / SafeLink serialization boundary. Protected shipped truth remains exact main@3b38ead2d00f44eb578d0689087b9293b3dabe1e.

At this issue synchronization, #176 is open/Draft at exact head 68aa1ed4f08e2c65826dccb02ca8f3e2da3a9407 on fix/public-markdown-resource-options-175. The live PR/head is lifecycle authority and must be refetched before any action rather than treating this issue snapshot as immutable evidence. #176 explicitly Closes #223; its repair is active-PR truth only and protected main does not yet ship it.

Runtime option-bag contract

The active #176 implementation accepts only undefined or the exact supported enumerable data-option shape on ordinary/null-prototype objects. Accessor-backed properties are rejected without invoking their getters. Unknown string keys, symbol keys, non-enumerable properties, exotic prototypes, malformed values, and hostile reflection failures fail closed through payload-redacted Inkspan errors before canonical serialization/avoidable UTF-8 allocation. Accepted canonical-envelope output bounds and RFC 8785-compatible bytes remain preserved.

JavaScript Proxy meta-object traps are a distinct reflection boundary and must not be misrepresented as a no-caller-code path. Inspecting an untrusted Proxy's prototype/own keys/descriptors can execute its getPrototypeOf, ownKeys, or getOwnPropertyDescriptor trap under JavaScript semantics. #176 now machine-checks that such a trap can execute while a private thrown value is normalized/redacted through the stable Inkspan configuration error. Callers that require a no-caller-code option-inspection boundary must supply ordinary or null-prototype data objects rather than Proxies.

Ownership and integration boundary

Preserved authority boundary

The eventual integrated repair must preserve configured output-size preflight and exact accepted canonical bytes and add no transport, persistence, authorization, tenancy, credential, network, model/provider, migration, retention, deployment, durable-audit, Yjs, or durable PDF authority.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiAPI, protocol, event, or external contractarea: authAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: securitySecurity boundary, hardening, or vulnerability preventionpriority: mediumNormal-priority or P2 workstatus: triagedOpen issue has an organization taxonomy assignmenttype: bugDefect or incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions