-
Notifications
You must be signed in to change notification settings - Fork 494
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
Host Software Table: Add vulnerability filters to API and UI #26995
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26995 +/- ##
==========================================
- Coverage 63.99% 63.96% -0.03%
==========================================
Files 1695 1707 +12
Lines 161602 163021 +1419
Branches 4299 4384 +85
==========================================
+ Hits 103412 104276 +864
- Misses 50166 50612 +446
- Partials 8024 8133 +109
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
frontend/pages/hosts/details/cards/Software/HostSoftwareTable/HostSoftwareTable.tsx
Show resolved
Hide resolved
Heads up we are doing this order from @ksykulev in this slack thread:
|
} | ||
} | ||
@media (max-width: $break-sm) { | ||
@media (max-width: ($break-lg - 1)) { | ||
.status__cell { | ||
display: none; | ||
width: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, nil, fleet.NewInvalidArgumentError( | ||
"query", "min_cvss_score, max_cvss_score, and exploit can only be provided with vulnerable=true", | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we care about any validations on MinimumCVSS
is less than MaximumCVSS
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll just return no items right? I don't really care either way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup! It will just return 0 items. Was just curious how in depth or validations get. 👍
This is a non-blocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm, yeah idk, I'm not familiar with BE patterns for invalid options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tl;dr doesn't seem like we are doing any sort of intelligent validations around those values. Let's not add it here then 👍
Looking at all the other places we use MinimumCVSS
and MaximumCVSS
In the datastore layer:
https://github.com/fleetdm/fleet/blob/main/server/datastore/mysql/software.go#L1489
https://github.com/fleetdm/fleet/blob/main/server/datastore/mysql/software.go#L1146
https://github.com/fleetdm/fleet/blob/main/server/datastore/mysql/software_titles.go#L108
https://github.com/fleetdm/fleet/blob/main/server/datastore/mysql/software_titles.go#L364
In the service layer:
https://github.com/fleetdm/fleet/blob/main/ee/server/service/software.go#L13
https://github.com/fleetdm/fleet/blob/main/server/service/software_titles.go#L87
https://github.com/fleetdm/fleet/blob/main/server/service/software.go#L113
https://github.com/fleetdm/fleet/blob/main/server/service/software.go#L244
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These look good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One code style thing, one legit question. Otherwise LGTM on the frontend side!
const { available_for_install } = queryParams; | ||
if (available_for_install) { | ||
return "installableSoftware"; | ||
} | ||
return "allSoftware"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { available_for_install } = queryParams; | |
if (available_for_install) { | |
return "installableSoftware"; | |
} | |
return "allSoftware"; | |
return queryParams.available_for_install ? "installableSoftware" : "allSoftware"; |
Non-blocking, but the one-liner seems clear enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Issue
For #22445
Description
Screenshots/screenrecordings
TODO
Checklist for submitter
If some of the following don't apply, delete the relevant line.
changes/
,orbit/changes/
oree/fleetd-chrome/changes