wordfence / wordfence-cli

Wordfence malware and vulnerability scanner command line utility.
https://www.wordfence.com/products/wordfence-cli/
GNU General Public License v3.0
100 stars 20 forks source link

Feature Request: Add argument to skip api.github.com version check #241

Closed davidnuzik closed 4 months ago

davidnuzik commented 4 months ago

Summary: I'd like to request the addition of an argument which will enable skipping the api.github.com version check to see if the CLI is the latest or not and notify the user.

Rationale: There are a few use cases I can think of:

  1. If I am in an environment that has strict firewall rules I would prefer to skip checking against github to see if I have the latest version. This will avoid messages from like "Unable to fetch the latest version".
  2. If I am utilizing --no-cache and thus there is no cache object on disk with the latest version info. I haven't tested but I believe this will cause consistent checks against the github api. I am not certain if there is logic to skip the check if --no-cache is used.
  3. If I am writing automation and frequently running the cli without a cache (this is the situation for me; I often encounter Github API rate limits and even have had my IP banned for a few days before).

Remarks: Perhaps we could call the argument --skip-latest-version-check or just --skip-version-check or something along those lines. My guess is this belongs in the "General Options" section of the cli help probably.

akenion commented 4 months ago

The existing hidden option --no-check-for-update can be used to disable this check. @davidnuzik if you can confirm this works for your needs, I'm going to close this case as already implemented.

davidnuzik commented 4 months ago

--no-check-for-update is perfect -- no requests to the github api and no update messages or issue attempting to check update messages in the CLI. This ticks all the boxes -- closing this issue.