Skip to content

Generic entities "Location" are not correctly handled #1019

Closed

Description

Description

Platform fails to properly handle "Location" SDO's when they are missing the "Latitude" and "Longitude" fields--even though those fields are optional, per the spec (section 4.9). Furthermore, when creating a "Country" entity, the platform does not allow the user to add "Latitude" and "Longitude" data, meaning that "Location" entities created within the OpenCTI GUI will always display improperly.

Environment

OpenCTI GUI v4.0.7

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Navigate to "Entities" > "Countries" > "+" and create a made-up country
  2. Export the entity using the ExportFileStix2 connector
  3. Import the entity to another OpenCTI instance using the ImportFileStix2 connector
    -- or --
  4. Import this entity into OpenCTI 4.0.7 using the ImportFileStix2 connector:
    { "type": "bundle", "id": "bundle--ce809d26-0f2c-4825-bd7f-bcde241ca766", "objects": [ { "id": "location--afaab66b-dcc4-5964-a91e-04a7c24513eb", "spec_version": "2.1", "revoked": false, "confidence": 0, "created": "2021-01-25T04:45:38.095Z", "modified": "2021-01-25T04:45:38.095Z", "name": "Made-Up Land", "description": "Made-Up Land is made-up!", "x_opencti_id": "25342c63-cf8c-4470-b091-e9519cc30526", "type": "location" } ] }
  5. Create relationship between Country entity and, for example, a Report entity
  6. Navigate to "Knowledge" tab of Report entity, and view Country (location) object.

Expected Output

The platform should display the Country object as a location entity in the "Knowledge" section of a "Report" object. Like so:
image

Actual Output

The platform renders the country object as a string saying, "/dashboard/entities/geo/positions"
image

Additional information

Recommendation:

  • Add ability to specify Lat/Long in "Country" creation screen
  • Fix handling of imported "location--" entities which are missing lat/long to render using the same icon as other "Country" (location--) entities

This error also shows up whenever the entity in question is listed in an entity list, like so:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    buguse for describing something not working as expectedfeatureuse for describing a new feature to developsolveduse to identify issue that has been solved (must be linked to the solving PR)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions