Skip to content

ti_recordedfuture: triggered_alert field is incorrectly mapped as keyword #18136

@efd6

Description

@efd6

The primary_entity field in the ti_recordedfuture.triggered_alert data stream is mapped as keyword in fields.yml, but the Recorded Future v3 alerts API returns it as an object with name, id, and type fields. When this happens, Elasticsearch rejects the document with a document_parsing_exception:

failed to parse field [recordedfuture.triggered_alert.primary_entity] of type [keyword].
Preview of field's value: '{name=Ransomware, id=J0Nl-p, type=MalwareCategory}'
caused_by: illegal_argument_exception: Expected text at 1:10642 but found START_OBJECT

The primary_entity field has the same shape as individual items in the entities array, which is already correctly mapped as a group with id, name, and type subfields. All existing test fixtures use "primary_entity": null, so the object case was never exercised.

Fix

Change primary_entity in fields/fields.yml from type: keyword to a group with id, name, type subfields (all keyword), matching the entities field structure. Add test data with a non-null primary_entity object, for example, {"name": "Ransomware", "id": "J0Nl-p", "type": "MalwareCategory"}.

Versions

  • Integration: ti_recordedfuture 2.4.1
  • Agent: 9.3.2

Metadata

Metadata

Labels

Integration:ti_recordedfutureRecorded FutureTeam:SDE-CrestCrest developers on the Security Integrations team [elastic/sit-crest-contractors]Team:Security-Service IntegrationsSecurity Service Integrations team [elastic/security-service-integrations]bugfixPull request that fixes a bug issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions