Skip to content

CLI renders table property keys and values as Rich markup without escaping #3984

Description

@sungwy

RichOutput.describe_properties in pyiceberg/cli/output.py adds property keys and values directly to a Rich table:

def describe_properties(self, properties: Properties) -> None:
    output_table = self._table
    for k, v in properties.items():
        output_table.add_row(k, v)
    Console().print(output_table)

Rich interprets console markup by default, so square-bracket sequences in a property key or value are treated as style tags rather than literal text. rich.markup.escape is not used anywhere in the CLI, and markup=False is not set.

The same pattern appears in the other describe_* methods that render server-supplied strings. The practical effect is that property content controls the styling of CLI output, and content with unbalanced or misleading tags can alter how surrounding rows render.


Issue investigation generated via claude, reviewed by Sung, Kevin, Fokko.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions