10up/wpcli-vulnerability-scanner

Broken table layout when reporting status for WordPress 4.9.6

oscarssanchez opened this issue · 3 comments

Running wp vuln status through WordPress 4.9.6 breaks the table layout when the package reports any vulnerabilities with WordPress version (not plugins, not themes. See screenshots).

Expected behavior:

Table layout is not broken. Expected to see the same layout as it is with the reports of plugins and themes.

Current behavior:

The table layout breaks.

Steps to reproduce:

Run wp-vulnerability scanner through a WordPress 4.9.6 install
1.- wp vuln status

Screenshots:

Layout broken when reporting problems with WordPress 4.9.6:

brokenlayourwpcli

Layout is fine when reporting WordPress 4.9.7

nobroken

No idea on the technical reason for this but it appears to be related to the use of WP_CLI::colorize() for the name field of vulnerable packages.

Example with color:

screen shot 2018-07-19 at 3 03 22 pm

And without:

screen shot 2018-07-19 at 3 03 57 pm

With a quick scan through issues on wp-cli/wp-cli and wp-cli/php-cli-tools it looks like this is a longstanding issue that has been fixed multiple times... E.g. wp-cli/php-cli-tools#106

Maybe it is worth re-opening there?

It seems like it is indeed not a problem with wp-vulnerability-scanner. Thanks for the catch @ssnepenthe !