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
Please replace every line in curly brackets { like this } with an appropriate answer, and remove this line.
Description
If you try to import a STIX 2 Indicator object with no valid_from, the code sets it to a millisecond long value when the database expects it to be a Date type, which throws an error.
Environment
OpenCTI current source code
Reproducible Steps
Steps to create the smallest reproducible scenario:
Step 1: Create a STIX 2 Indicator, without valid_from set
Step 2: Ensure it is valid STIX
Step 3: Attempt import to OpenCTI
Expected Output
Expect it to import
Actual Output
grakn.core.kb.concept.api.GraknConceptException: The value [1579035233199] of type [Long] must be of datatype [java.time.LocalDateTime] at grakn.core.kb.concept.api.GraknConceptException.create(GraknConceptException.java:55) at grakn.core.kb.concept.api.GraknConceptException.invalidAttributeValue(GraknConceptException.java:116) at grakn.core.concept.manager.ConceptManagerImpl.createAttribute(ConceptManagerImpl.java:271) at grakn.core.concept.manager.ConceptManagerImpl.createAttribute(ConceptManagerImpl.java:92) at grakn.core.concept.impl.AttributeTypeImpl.putAttribute(AttributeTypeImpl.java:120)
Additional information
Problematic generated insert statement
insert $entity isa Indicator, has internal_id_key "indicator--590884dd-3573-470d-b12c-91097f412be3", has stix_id_key "indicator--590884dd-3573-470d-b12c-91097f412be3", has name "Indicator", has description "", has indicator_pattern "[ipv4-addr:value = '172.31.88.63']", has pattern_type "stix2", has main_observable_type "ipv4-addr", has valid_from 1579098216711, has valid_from_day "2020-01-15", has valid_from_month "2020-01", has valid_from_year "2020", has valid_until 2021-01-14T14:23:36, has valid_until_day "2021-01-14", has valid_until_month "2021-01", has valid_until_year "2021", has score 50, has created 2019-11-27T15:26:08, has modified 2019-11-27T15:26:08, has entity_type "indicator", has created_at 2020-01-15T14:23:36, has created_at_day "2020-01-15", has created_at_month "2020-01", has created_at_year "2020", has updated_at 2020-01-15T14:23:36, has alias "", has revoked false, has valid_from_day "2020-01-15", has valid_from_month "2020-01", has valid_from_year "2020", has valid_until_day "2021-01-14", has valid_until_month "2021-01", has valid_until_year "2021", has created_at_day "2020-01-15", has created_at_month "2020-01", has created_at_year "2020";
The text was updated successfully, but these errors were encountered:
Please replace every line in curly brackets { like this } with an appropriate answer, and remove this line.
Description
If you try to import a STIX 2 Indicator object with no valid_from, the code sets it to a millisecond long value when the database expects it to be a Date type, which throws an error.
Environment
OpenCTI current source code
Reproducible Steps
Steps to create the smallest reproducible scenario:
Step 1: Create a STIX 2 Indicator, without valid_from set
Step 2: Ensure it is valid STIX
Step 3: Attempt import to OpenCTI
Expected Output
Expect it to import
Actual Output
grakn.core.kb.concept.api.GraknConceptException: The value [1579035233199] of type [Long] must be of datatype [java.time.LocalDateTime] at grakn.core.kb.concept.api.GraknConceptException.create(GraknConceptException.java:55) at grakn.core.kb.concept.api.GraknConceptException.invalidAttributeValue(GraknConceptException.java:116) at grakn.core.concept.manager.ConceptManagerImpl.createAttribute(ConceptManagerImpl.java:271) at grakn.core.concept.manager.ConceptManagerImpl.createAttribute(ConceptManagerImpl.java:92) at grakn.core.concept.impl.AttributeTypeImpl.putAttribute(AttributeTypeImpl.java:120)
Additional information
Problematic generated insert statement
insert $entity isa Indicator, has internal_id_key "indicator--590884dd-3573-470d-b12c-91097f412be3", has stix_id_key "indicator--590884dd-3573-470d-b12c-91097f412be3", has name "Indicator", has description "", has indicator_pattern "[ipv4-addr:value = '172.31.88.63']", has pattern_type "stix2", has main_observable_type "ipv4-addr", has valid_from 1579098216711, has valid_from_day "2020-01-15", has valid_from_month "2020-01", has valid_from_year "2020", has valid_until 2021-01-14T14:23:36, has valid_until_day "2021-01-14", has valid_until_month "2021-01", has valid_until_year "2021", has score 50, has created 2019-11-27T15:26:08, has modified 2019-11-27T15:26:08, has entity_type "indicator", has created_at 2020-01-15T14:23:36, has created_at_day "2020-01-15", has created_at_month "2020-01", has created_at_year "2020", has updated_at 2020-01-15T14:23:36, has alias "", has revoked false, has valid_from_day "2020-01-15", has valid_from_month "2020-01", has valid_from_year "2020", has valid_until_day "2021-01-14", has valid_until_month "2021-01", has valid_until_year "2021", has created_at_day "2020-01-15", has created_at_month "2020-01", has created_at_year "2020";
The text was updated successfully, but these errors were encountered: