-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid output for status command when using format option #23
Comments
One suggestion for a fix for JSON - it shouldn't be too hard to extend it for the other types also #25 |
If I run format=count the output of any of the commands like theme-status or plugin-status don´t return a 0 if no vulnerability is found. The logic is to check first if any vulnerability is found and then print it out if necessary to update the theme or plugin or skip if not. Similar behaviour if you try wp core check-update --format=count returning >0 if you need to upgrade. |
Any chance for this to be fixed? |
Will look to validate this once 1.1.0 is released, so punting this out of the milestone for now. |
Update: Issue for json format is fixed by PR #25, but issue still exists for other format like csv, yaml. As headers are still being printed in that formats. $ wp vuln status --format=csv
WordPress 6.2.2
name,"installed version",status,"introduced in","fixed in"
WordPress,6.2.2,"No vulnerabilities reported for this version of WordPress",n/a,n/a
Plugins
name,"installed version",status,"introduced in","fixed in"
safe-redirect-manager,2.0.1,"No vulnerabilities reported for this version of safe-redirect-manager",n/a,n/a
safe-svg,2.1.1,"No vulnerabilities reported for this version of safe-svg",n/a,n/a
simple-google-news-sitemap,1.0.2,"No vulnerabilities reported for this version of simple-google-news-sitemap",n/a,n/a
simple-page-ordering,2.4.3,"WordPress Simple Page Ordering plugin <= 2.5.0 - Broken Access Control vulnerability","<= 2.5.0",2.5.1
Themes
name,"installed version",status,"introduced in","fixed in"
twentytwentythree,1.1,"No vulnerabilities reported for this version of twentytwentythree",n/a,n/a
twentytwentytwo,1.4,"No vulnerabilities reported for this version of twentytwentytwo",n/a,n/a |
There are two parts to this... When running
wp vuln status --format=json
:Because of this you cannot easily reuse the output from this command:
The same goes for all other allowed formats.
Not sure if this is important to you or not but I thought I should point it out since this seems like it would be the main use for these alternative output formats.
The text was updated successfully, but these errors were encountered: