-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
False
-
-
False
-
-
Description of problem:
The tkn-approvaltask CLI allows users to input approval comments (-m) of indefinite length without any validation. When a user inputs an excessively long string, the tkn-approvaltask describe command attempts to render the full string in the "Message" column.
Similarly in the UI, while approving the approval task there is a reason box to provide the comments.
This results in a flooded terminal window, breaking the table formatting and making it difficult to read other details of the approval task.
Prerequisites (if any, like setup, operators/versions):
OSP 1.21.0
Steps to Reproduce
- Identify a pending Approval Task.
- Approve the task using the CLI with a massive message string
tkn-approvaltask approve <task-name> -n <namespace> -m "$(for i in {1..2000}; do echo -n 'K'; done)" - Run the describe command to view the status:
tkn-approvaltask describe <task-name> -n <namespace>
Actual results:
- The CLI should enforce a reasonable character limit
- If long messages are allowed, the describe command should truncate the message in the table view
Expected results:
The CLI accepts the full string length. The describe output dumps the entire string into the console, spamming the terminal and rendering the Approver response table unreadable
Additional info (Such as Logs, Screenshots, etc):
Attached screenshot below