fix: avoid leaking hidden column data in DOM — data table column visibility#4461
Open
neuralmint wants to merge 1 commit into
Open
fix: avoid leaking hidden column data in DOM — data table column visibility#4461neuralmint wants to merge 1 commit into
neuralmint wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
src/common/columns.py—filter_fields()plucks only the requested columns from agent recordsGET /api/v2/agentsnow accepts an optionalfieldsquery parameterfields→ safe system fields only (id, name, type, status)fields=id,name,status→ only those columns returnedfields=*→ all fields (for full-access scenarios)tests/test_columns.py— 8 tests covering safe defaults, explicit fields, star wildcard, missing/unknown fields, whitespace handlingAcceptance Criteria