Skip to content

[Export] Nested relationship attributes leak into columns and every export format #69

Description

@Exotic209093

Severity

High — junk Account.attributes.type/.url columns in grid and files for any relationship query.

What happens

flattenRecord only skips attributes when path === 'attributes' (top level). SELECT Id, Account.Name FROM Contact returns Account: { attributes: {...}, Name }; the visitor recurses into Account.attributes and emits Account.attributes.type/Account.attributes.url as real columns in the grid, deriveColumns, and CSV/JSON/Excel/XML output. Because Salesforce puts attributes first, these junk columns also consume slots in the 14-column default selection ahead of the actual Account.Name. The existing test only covers the top-level case.

Evidence

  • src/ui/utils/records.ts:27
  • tests/unit/ui-utils.test.ts:5 (fixture lacks nested attributes)

Suggested fix

Skip when the key segment is attributes (e.g. if (k === 'attributes') continue; in the plain-object loop) rather than comparing the full path.

Environment

Commit 74cf21b (main), WaveLink 0.6.0. Found in the 2026-08-31 adversarial audit (code-verified).

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

    bugSomething isn't working

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions