Skip to content

[finding] sys_user_permission_set.delegated_from is declared and data-door-writable, but the runtime delegation gate structurally never reads it on this object #9730

Description

@os-support-ai

Filed by the triage seat from the standing security-object enumeration patrol (enumeration without verdicts; same survey family as the D5 pair already recorded elsewhere — this card is the one new zero/near-zero key it surfaced). Unassigned, awaiting first-touch grading. ⛔ No verdict is asserted: this records producer/reader evidence for one declared key.

Declaration

packages/plugins/plugin-security/src/objects/sys-user-permission-set.object.ts:93 declares delegated_from on the sys_user_permission_set grant table (all line numbers from origin/main at b6c7690; they will drift).

Producer evidence

git grep -n "delegated_from" origin/main -- packages apps examples ':!*CHANGELOG*'

  • Zero production code assigns delegated_from on a sys_user_permission_set row. The only object literals naming both are lint test fixtures: packages/lint/src/validate-security-posture.test.ts:1001, packages/lint/src/validate-security-posture.runtime-surface.test.ts:462,485.
  • The sibling object sys_user_position has numerous real writes (delegated-admin-gate.test.ts:439-688 exercise them).
  • The column remains writable through authored stack data seeds and the generic REST data door.

Reader evidence

Two readers exist; the runtime one excludes this object:

  • packages/plugins/plugin-security/src/delegated-admin-gate.ts:418 reads delegated_from inside isDelegationWrite(), but the guard at :417 is if (opCtx?.object !== 'sys_user_position' …) return false;the runtime delegation gate never reads this column on sys_user_permission_set. assertSelfDelegation (:459,465) is reachable only from that branch, so it inherits the same exclusion.
  • packages/lint/src/validate-security-posture.ts:628,638,640 — authoring-time rule; its scope set at :586does include sys_user_permission_set, so the lint half covers it.

Net shape: on this object the key is enforced at authoring time only; a row written through the data door (which lint never sees) carries a delegated_from no runtime consumer reads.

Positive control (same object, same pattern style)

valid_until — a live key on the same table — hits both sides with the same grep style: producer via authored seeds/data door, reader packages/core/src/security/grant-validity.ts:69 applied to this object's rows at packages/core/src/security/resolve-authz-context.ts:420. So the zero above is a measurement, not a broken grep.

Refs

  • Survey subject and sibling: sys-user-permission-set.object.ts / sys-user-position.object.ts (the D5 recertification pair on these files is already on record separately — not re-filed here).
  • delegated-admin-gate.ts:417-465 (the object-scoped runtime branch), validate-security-posture.ts:586 (the lint scope set).

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions