Bugfix: remove filter validation (#21399)

This commit is contained in:
Tim Lee 2024-08-19 14:14:01 -06:00 committed by GitHub
parent 83be4f1d8b
commit 5b9074836e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,10 +96,6 @@ func (ds *Datastore) ListSoftwareTitles(
opt.ListOptions.OrderDirection = fleet.OrderDescending
}
if opt.AvailableForInstall && opt.VulnerableOnly {
return nil, 0, nil, fleet.NewInvalidArgumentError("query", "available_for_install and vulnerable can't be provided together")
}
if (opt.MinimumCVSS > 0 || opt.MaximumCVSS > 0 || opt.KnownExploit) && !opt.VulnerableOnly {
return nil, 0, nil, fleet.NewInvalidArgumentError("query", "min_cvss_score, max_cvss_score, and exploit can only be provided with vulnerable=true")
}