Skip to content

Commit

Permalink
added check for threat intel (#849)
Browse files Browse the repository at this point in the history
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
(cherry picked from commit 9d56138)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Feb 6, 2024
1 parent 9a63df0 commit 0d2698b
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,14 @@ export default class ConfigureFieldMapping extends Component<
mappingsView.response.properties[ruleFieldName].path;
});
let threatIntelFeedFields = new Set();
mappingsView.response.threat_intel_field_aliases?.forEach(({ fields }) => {
fields.forEach((field) => threatIntelFeedFields.add(field));
});

// Only if threat_intel is enabled, we want to show the relevant fields for mapping
if (this.state.detector.threat_intel_enabled) {
mappingsView.response.threat_intel_field_aliases?.forEach(({ fields }) => {
fields.forEach((field) => threatIntelFeedFields.add(field));
});
}

mappingsView.response.unmapped_field_aliases?.forEach((ruleFieldName) => {
if (
!ruleFieldsForEnabledRules.has(ruleFieldName) &&
Expand Down

0 comments on commit 0d2698b

Please sign in to comment.