--skip-version-check appears not to work #10971
DescriptionI've had a look, and whilst I can see #10623 I'm not sure if it's applicable or not to this specific finding. We are running DEBUG [notification] Running version check
DEBUG [notification] Failed getting response from Trivy api err=Get \"https://check.trivy.dev/updates\": read tcp ... connection reset by peerOur FW won't let this flow out, so that is the cause of the failure. However, I have used the Trivy version: 0.72.0 Desired BehaviorRespects Actual BehaviorAs per description Reproduction StepsAs per descriptionTargetFilesystem ScannerMisconfiguration Output FormatNone ModeStandalone Debug OutputSee descriptionOperating SystemLinux Version0.72.0Checklist
|
Replies: 1 comment 4 replies
|
Hello @mtcolman, thanks for the report! This is expected behavior, and #10623 is indeed applicable to your case.
You can see this logic in if v.cliOptions.SkipVersionCheck && v.cliOptions.DisableTelemetry {
logger.Debug("Skipping update check and metric ping")
return
}So in your case: trivy config -d ... --skip-version-check --disable-telemetryThis is documented in the air-gap guide, which was added by #10623. Note that the failing request is harmless — it's non-blocking, has a 3-second timeout, and doesn't affect the scan results or the exit code. |
Good point, and it's a fair one — let me explain what actually happens under the hood.
This is a design specific to how Trivy works: we have only one endpoint, which serves both purposes at once — it receives the telemetry and returns the version information.
There is no separate telemetry-only channel, and the telemetry is sent as headers on that very same request.
So when you disable the version check, you don't disable the request to the endpoint.
What happens is: the telemetry data is still sent, the version is still received and parsed — but afterwards it is simply not compared against your current CLI version, because of the flag.
In other words,
--skip-version-checksuppresses the …