mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Merge branch 'main' into feat-automatic-migrate-windows-hosts
This commit is contained in:
commit
5aef78ee26
3 changed files with 25 additions and 23 deletions
1
changes/24093-clear-policy-automation
Normal file
1
changes/24093-clear-policy-automation
Normal file
|
|
@ -0,0 +1 @@
|
|||
- Fleet UI: Fix ability to clear policy automation that empties webhook URL
|
||||
|
|
@ -185,24 +185,23 @@ const OtherWorkflowsModal = ({
|
|||
|
||||
const newErrors = { ...errors };
|
||||
|
||||
if (
|
||||
isPolicyAutomationsEnabled &&
|
||||
newPolicyIds.length &&
|
||||
!isWebhookEnabled &&
|
||||
!selectedIntegration
|
||||
) {
|
||||
newErrors.integration = "Please enable at least one integration:";
|
||||
} else {
|
||||
delete newErrors.integration;
|
||||
}
|
||||
|
||||
if (isWebhookEnabled) {
|
||||
if (!destinationUrl) {
|
||||
newErrors.url = "Please add a destination URL";
|
||||
} else if (!validUrl({ url: destinationUrl })) {
|
||||
newErrors.url = `${destinationUrl} is not a valid URL`;
|
||||
if (isPolicyAutomationsEnabled) {
|
||||
// Ticket workflow validation
|
||||
if (newPolicyIds.length && !isWebhookEnabled && !selectedIntegration) {
|
||||
newErrors.integration = "Please enable at least one integration:";
|
||||
} else {
|
||||
delete newErrors.url;
|
||||
delete newErrors.integration;
|
||||
}
|
||||
|
||||
// Webhook workflow validation
|
||||
if (isWebhookEnabled) {
|
||||
if (!destinationUrl) {
|
||||
newErrors.url = "Please add a destination URL";
|
||||
} else if (!validUrl({ url: destinationUrl })) {
|
||||
newErrors.url = `${destinationUrl} is not a valid URL`;
|
||||
} else {
|
||||
delete newErrors.url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -343,12 +343,14 @@ func TestTranslateCPEToCVE(t *testing.T) {
|
|||
excludedCVEs: []string{"CVE-2024-4030"},
|
||||
continuesToUpdate: true,
|
||||
},
|
||||
"cpe:2.3:a:python:python:3.9.6:*:*:*:*:windows:*:*": {
|
||||
includedCVEs: []cve{
|
||||
{ID: "CVE-2024-4030", resolvedInVersion: "3.9.20"},
|
||||
},
|
||||
continuesToUpdate: true,
|
||||
},
|
||||
// Skipping test while troubleshooting https://github.com/fleetdm/fleet/issues/24286
|
||||
//
|
||||
// "cpe:2.3:a:python:python:3.9.6:*:*:*:*:windows:*:*": {
|
||||
// includedCVEs: []cve{
|
||||
// {ID: "CVE-2024-4030", resolvedInVersion: "3.9.20"},
|
||||
// },
|
||||
// continuesToUpdate: true,
|
||||
// },
|
||||
// Tests the expandCPEAliases rule for virtualbox on macOS
|
||||
"cpe:2.3:a:oracle:virtualbox:7.0.6:*:*:*:*:macos:*:*": {
|
||||
includedCVEs: []cve{
|
||||
|
|
|
|||
Loading…
Reference in a new issue