10up / wpcli-vulnerability-scanner

WP-CLI command for checking installed plugins and themes for vulnerabilities reported on wpvulndb.com
MIT License
274 stars 40 forks source link

Add --skip-cache flag #61

Open davidegreenwald opened 2 years ago

davidegreenwald commented 2 years ago

Is your enhancement related to a problem? Please describe.

We have seen intermittent issues where the transient value storing API information gets stuck in Memcached and does not expire on time. This has been challenging to replicate and I think the best solution would be to add optional functionality to bypass the cached transient key and ensure a call to the API is made. This would be helpful to users conducting a daily scan who never need cache.

Describe the solution you'd like

Add --skip-cache or another similar flag to the available plugin flags to make an API call and not check for the presence of the transient. I believe this logic is happening here: https://github.com/10up/wpcli-vulnerability-scanner/blob/develop/wpcli-vulnerability-scanner.php#L1044