Fleet UI: Custom CVSS scores followup (#31849)

This commit is contained in:
RachelElysia 2025-08-13 09:55:35 -04:00 committed by GitHub
parent d9f23e23c3
commit df9eb58d52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -169,8 +169,8 @@ const SoftwareFiltersModal = ({
onSubmit({
vulnerable: vulnSoftwareFilterEnabled,
exploit: hasKnownExploit || undefined,
minCvssScore: min === 0 ? undefined : min,
maxCvssScore: max === 10 ? undefined : max,
minCvssScore: min === 0 && max === 10 ? undefined : min, // Only clear severity if set to 0-10
maxCvssScore: min === 0 && max === 10 ? undefined : max, // Only clear severity if set to 0-10
});
};
@ -224,6 +224,7 @@ const SoftwareFiltersModal = ({
value={formData.minScore}
disabled={!vulnSoftwareFilterEnabled}
type="number"
placeholder="0.0"
min={0}
max={10}
step={0.1}
@ -237,6 +238,7 @@ const SoftwareFiltersModal = ({
value={formData.maxScore}
disabled={!vulnSoftwareFilterEnabled}
type="number"
placeholder="10.0"
min={0}
max={10}
step={0.1}