Skip to content

Commit

Permalink
added check for threat intel
Browse files Browse the repository at this point in the history
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
  • Loading branch information
amsiglan committed Jan 4, 2024
1 parent 7837a99 commit e6649e6
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,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 e6649e6

Please sign in to comment.