You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Many connector module have from_stix_maps that map STIX references (e.g. email-message:from_ref) instead of mapping a property of the referenced object (in this example email-message:from_ref.value since from_ref references an email-addr object, and the actual email address is in that object's value property).
To Reproduce
Steps to reproduce the behavior:
Try to use a valid STIX pattern:
$ python main.py translate gcp_chronicle query '{}' "[email-message:from_ref.value = '[email protected]']"
2024-01-17 11:40:06,491 stix_shifter.stix_translation.stix_translation ERROR Caught exception: Unable to map the following STIX objects and properties: ['email-message:from_ref.value'] to data source fields <class 'stix_shifter_utils.stix_translation.src.utils.exceptions.DataMappingException'>
2024-01-17 11:40:06,491 stix_shifter_utils.stix_translation.stix_translation_error_mapper ERROR received exception => DataMappingException: Unable to map the following STIX objects and properties: ['email-message:from_ref.value'] to data source fields
{
"success": false,
"connector": "gcp_chronicle",
"code": "mapping_error",
"error": "gcp_chronicle connector error => data mapping error : Unable to map the following STIX objects and properties: ['email-message:from_ref.value'] to data source fields"
}
This should work, since that's a perfectly valid STIX pattern and the target datasource has email data.
This actually shouldn't work since the value from_ref in STIX would be a STIX object ID (e.g. "email-addr-" in 2.1 or just a number like "2" in 2.0).
Expected behavior
Valid STIX patterns, e.g. those that actually specify a STIX object path to a property (e.g. email-message:from_ref.value which points to a email-addr:value property), should work. Mapping a reference is weird, but I suppose stix-shifter could allow it (especially for backwards compatibility, since it has accepted it for a while).
Describe the bug
Many connector module have
from_stix_map
s that map STIX references (e.g.email-message:from_ref
) instead of mapping a property of the referenced object (in this exampleemail-message:from_ref.value
sincefrom_ref
references anemail-addr
object, and the actual email address is in that object'svalue
property).To Reproduce
Steps to reproduce the behavior:
This should work, since that's a perfectly valid STIX pattern and the target datasource has email data.
.value
:This actually shouldn't work since the value
from_ref
in STIX would be a STIX object ID (e.g. "email-addr-" in 2.1 or just a number like "2" in 2.0).Expected behavior
Valid STIX patterns, e.g. those that actually specify a STIX object path to a property (e.g.
email-message:from_ref.value
which points to aemail-addr:value
property), should work. Mapping a reference is weird, but I suppose stix-shifter could allow it (especially for backwards compatibility, since it has accepted it for a while).List of all improper mappings
The text was updated successfully, but these errors were encountered: