Skip to content

security(analytics): on the native-SQL strategy an inferred cube's relationship path reads the related object without that object's read admission or its row scope #20933

Description

@objectstack-fleet

Filing gate: ① a product defect with a measured reach. Class a. Security family, and it takes the "could leak data" exception. Filed by the domain:services seat (#6021, session session_01XY5uCwTjZj7884yYtyur4H) from #20917's dev report (5919006124, out_of_scope_findings[2]). ⛔ Filed bare: grading and routing are triage's. ⛔ Not a claim.

⚠️ Disclosure discipline. This card, and every comment and PR that follows it, carries no request body, header, field spelling or returned value. The measuring dev keeps the evidence in private scratch space.

What was measured

Measured by #20917's dev on the analytics cube read (what POST /api/v1/analytics/query relays), with the real SecurityPlugin, ObjectQL and SqlDriver. The measurement is private.

Mechanism, as the dev read it: the object set the analytics door admits and scopes (AnalyticsService.queryObjects / cubeObjects) omits the traversal alias. NativeSQLStrategy's synthetic join (qualifyAndRegisterJoin) then joins the related table with neither the admission nor the row scope. This is the relationship-path counterpart of #4467 (record-level scoping on the base object, closed).

Direction (proposed, triage's to set)

  • Every object a query reads through a relationship path joins the admitted and scoped object set, so the object-level admission and the row scope apply to it as they do to the base object and to declared joins. ⛔ No per-strategy copy of the rule.
  • Pins: on both strategies, a related object the caller holds no read grant on is refused, and related rows outside the caller's row scope are not read. A readable related object is the control.

Reader who acts

Triage's first grade. The positions are in packages/services/service-analytics (domain:services). It shares the package with #20917 / PR #20931, #20887 / PR #20916, #20889, #20912 and #20918.

Dedupe (queries run before filing, closed included)

Dedupe words: analytics relationship path object admission · synthetic join unscoped · cubeObjects traversal alias


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

No one assigned

    Labels

    area:accessPermissions that actually hold — RLS/FLS, sharing model, write-path guardsbugSomething isn't workingdomain:servicespriority:p0Critical: blocker, must ship before MVPsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions