Skip to content

Commit

Permalink
fix: entity mapping issues for Sigma
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFustang committed Nov 12, 2024
1 parent 7f2dd76 commit bd58575
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/droid/platforms/sentinel.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,14 @@ def create_rule(self, rule_content, rule_converted, rule_file):
enabled = True

# Handling the entities
entity_mappings = []
if rule_content.get('custom', {}).get('entity_mappings'):
entity_mappings = []
for mapping in rule_content['custom']['entity_mappings']:
field_mappings = [FieldMapping(identifier=field['identifier'], column_name=field['column_name'])
for field in mapping['field_mappings']]
entity_mappings.append(EntityMapping(entity_type=mapping['entity_type'], field_mappings=field_mappings))
else:
entity_mappings = None

# Handling the severity
if rule_content['level'] == 'critical':
Expand Down

0 comments on commit bd58575

Please sign in to comment.