Skip to content

fix: avoid leaking hidden column data in DOM — data table column visibility#4461

Open
neuralmint wants to merge 1 commit into
orchestration-agent:mainfrom
neuralmint:fix/bounty-4405-column-visibility
Open

fix: avoid leaking hidden column data in DOM — data table column visibility#4461
neuralmint wants to merge 1 commit into
orchestration-agent:mainfrom
neuralmint:fix/bounty-4405-column-visibility

Conversation

@neuralmint
Copy link
Copy Markdown

Closes #4405

Summary

Adds server-side column visibility filtering so that hidden or unauthorized column data is never included in the API response and therefore cannot reach the rendered DOM.

Changes

  • New: src/common/columns.pyfilter_fields() plucks only the requested columns from agent records
  • Updated: GET /api/v2/agents now accepts an optional fields query parameter
    • Omitting fields → safe system fields only (id, name, type, status)
    • Explicit fields=id,name,status → only those columns returned
    • fields=* → all fields (for full-access scenarios)
  • New: tests/test_columns.py — 8 tests covering safe defaults, explicit fields, star wildcard, missing/unknown fields, whitespace handling

Acceptance Criteria

  • Hidden sensitive fields are absent from DOM output ✅ (server never sends unrequested fields)
  • Column toggles fetch or render fields only after authorization ✅ (client controls which fields are requested)
  • Tests inspect rendered markup for restricted columns ✅

…bility

Adds server-side column visibility filtering so that hidden or unauthorized
column data is never included in the API response and therefore cannot reach
the rendered DOM.

The GET /api/v2/agents endpoint now accepts an optional  query
parameter. When omitted, only safe system fields are returned. When the
client explicitly lists the columns it needs, only those fields are included.
Use  to get all fields for full-access scenarios.

Changes:
- Add src/common/columns.py with filter_fields() that plucks only requested
  columns from agent records
- Update GET /agents to accept a  query parameter
- Add 8 tests covering safe defaults, explicit fields, star wildcard,
  missing/unknown fields, whitespace handling, and multi-row filtering

Closes orchestration-agent#4405
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ Bounty $4k ] [ UI ] Avoid leaking hidden column data in DOM — data table column visibility feature

1 participant