Skip to content
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

Warning added for unmapped from_stix fields. #1729

Merged
merged 2 commits into from
Aug 29, 2024
Merged
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 @@ -114,8 +114,10 @@ def transform_query(self, data):
unmapped_operator = stripped_parsing.get('unmapped_operator')
if unmapped_stix:
unmapped_stix_collection.extend(unmapped_stix)
self.logger.warn(f"The following STIX fields are not supported : {set(unmapped_stix_collection)} with dialect {self.dialect}. The request will ignore those fields. This can result in results that do not match the request.")
if unmapped_operator:
unmapped_operator_collection.extend(unmapped_operator)
self.logger.warn(f"The following STIX operators are not supported : {set(unmapped_operator_collection)} with dialect {self.dialect}. The request will ignore those fields. This can result in results that do not match the request.")
if antlr_parsing:
translated_queries = self.transform_antlr(data, antlr_parsing)
if isinstance(translated_queries, str):
Expand Down
Loading