OpenCTI-Platform / opencti

Open Cyber Threat Intelligence Platform
https://opencti.io
Other
5.12k stars 813 forks source link

OpenCTI does not render base64 encoded images in markdown reports #7489

Open br01805 opened 2 days ago

br01805 commented 2 days ago

Description

The platform doesn't appear to support base64 encoded images in markdown

Environment

  1. OS (where OpenCTI server runs):portainer.io
  2. OpenCTI version: 6.1.12
  3. OpenCTI client: frontend
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Ingest a markdown report with base64 encoded images
  2. Analyses -> Reports
  3. Notice images do not render

Expected Output

Images render inline with markdown

Actual Output

No image is being displayed

Additional information

I'm not sure react-mde lib handles this

Screenshots (optional)

nino-filigran commented 2 days ago

@br01805 can you please share the file that you used?

That would be helpful!

marieflorescontact commented 2 days ago

I think it should work with the library we use: https://github.com/andrerpena/react-mde?tab=readme-ov-file#readme

Or we don't use the library properly 🤔

if you play with the sandBox and paste an encoded image test it works: https://codesandbox.io/s/react-mde-latest-forked-f9ti5?file=/src/index.js

marieflorescontact commented 2 days ago

I've asked the question directly to the react-mde team: https://github.com/andrerpena/react-mde/issues/361

br01805 commented 1 day ago

@br01805 can you please share the file that you used?

That would be helpful!

opencti_stix_report.json