Skip to content

Commit

Permalink
[Security Solution] Removes items_per_search and `concurrent_search…
Browse files Browse the repository at this point in the history
…es` from `upgrade/_review` API endpoint logic (#190440)

## Summary

Addresses #188061

Removes the threat match fields `items_per_search` and
`concurrent_searches` from the `DiffableRule` type we utilize in the
`upgrade/_review` endpoint logic. This omits these fields from the
upgrade review workflow as we will never have incoming updates for the
fields.



### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
dplumlee and elasticmachine authored Sep 4, 2024
1 parent e23c890 commit 2ac4a48
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ import { z } from '@kbn/zod';

import {
AnomalyThreshold,
ConcurrentSearches,
EventCategoryOverride,
HistoryWindowStart,
InvestigationGuide,
ItemsPerSearch,
MachineLearningJobId,
MaxSignals,
NewTermsFields,
Expand Down Expand Up @@ -137,8 +135,6 @@ export const DiffableThreatMatchFields = z.object({
threat_mapping: ThreatMapping,
data_source: RuleDataSource.optional(), // NOTE: new field
threat_indicator_path: ThreatIndicatorPath.optional(),
concurrent_searches: ConcurrentSearches.optional(),
items_per_search: ItemsPerSearch.optional(),
});

export type DiffableThresholdFields = z.infer<typeof DiffableThresholdFields>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ export const DEFINITION_UPGRADE_FIELD_ORDER: Array<keyof DiffableAllFields> = [
'threat_mapping',
'threat_query',
'threat_indicator_path',
'concurrent_searches',
'items_per_search',
'new_terms_fields',
'history_window_start',
'max_signals',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,6 @@ const threatMatchFieldsDiffAlgorithms: FieldsDiffAlgorithmsFor<DiffableThreatMat
threat_index: scalarArrayDiffAlgorithm,
threat_mapping: simpleDiffAlgorithm,
threat_indicator_path: singleLineStringDiffAlgorithm,
concurrent_searches: simpleDiffAlgorithm,
items_per_search: simpleDiffAlgorithm,
};

const calculateThresholdFieldsDiff = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ const extractDiffableThreatMatchFieldsFromRuleObject = (
threat_index: rule.threat_index,
threat_mapping: rule.threat_mapping,
threat_indicator_path: rule.threat_indicator_path,
concurrent_searches: rule.concurrent_searches,
items_per_search: rule.items_per_search,
};
};

Expand Down

0 comments on commit 2ac4a48

Please sign in to comment.