Skip to content

Importing report JSON bundle with files (x_opencti_files) fails #60

@maertv

Description

@maertv

Description

Importing report JSON bundle with file (x_opencti_files) fails. The file is not uploaded to OpenCTI.

Environment

  1. OS: Ubuntu 18.04.3 LTS
  2. OpenCTI version: 2.1.3
  3. client-python: 2.1.12

Reproducible Steps

Importing report JSON bundle with x_opencti_files custom properties fails. The report is added to the OpenCTI but the PDF file is missing.

Expected Output

The report with the PDF file is imported to OpenCTI

Actual Output

The is an error message in the log:

[opencti_stix_domain_entity] Missing parameters: id or file_name or data

Additional information

I suspect that the add_file method in /pycti/utils/opencti_stix2.py (lines 516-520) is missing id=stix_object_result["id"].

Metadata

Metadata

Assignees

Labels

buguse for describing something not working as expectedsolveduse to identify issue that has been solved (must be linked to the solving PR)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions