Skip to content

Gis case insensitive sigma mapping #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ field_mapping:
dns_query_name: xdm.network.dns.dns_question.name
QueryName: xdm.network.dns.dns_question.name
query: xdm.network.dns.dns_question.name
dns-record-type: xdm.network.dns.dns_question.type
dns-record-type: xdm.network.dns.dns_question.type
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ field_mapping:
EventSeverity: EventSeverity
Source:
- Source
- source
- source
6 changes: 3 additions & 3 deletions uncoder-core/app/translator/platforms/sigma/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ def __init__(
def is_suitable(
self, service: Optional[list[str]], product: Optional[list[str]], category: Optional[list[str]]
) -> bool:
product_match = set(product or []).issubset(self.products) if product else False
category_match = set(category or []).issubset(self.categories) if category else False
service_match = set(service or []).issubset(self.services) if service else False
product_match = set(product_.lower() for product_ in product or []).issubset(self.products) if product else False
category_match = set(category_.lower() for category_ in category or []).issubset(self.categories) if category else False
service_match = set(service_.lower() for service_ in service or [] or []).issubset(self.services) if service else False
if not product and not service:
return category_match
return product_match and service_match or product_match and category_match
Expand Down
Loading