Code Monkey home page Code Monkey logo

Comments (5)

Jipegien avatar Jipegien commented on July 26, 2024

can lead to break of file confidentiality inside a platform

from connectors.

SouadHadjiat avatar SouadHadjiat commented on July 26, 2024

Issue reproduced. On it.

Before validating the workbench on the empty report
Capture d'écran 2024-05-17 121711

After validation : I see the txt file added
Capture d'écran 2024-05-17 121846

from connectors.

SouadHadjiat avatar SouadHadjiat commented on July 26, 2024

The issue seem to be happening in importdocument connector : The connector seem to keep in memory the last uploaded file (global import), and add it to the report bundle. I suspect this part of the code :

if data["file_id"].startswith("import/global"):
    file_data = open(file_name, "rb").read()
    file_data_encoded = base64.b64encode(file_data)
    self.file = {
        "name": data["file_id"].replace("import/global/", ""),
        "data": file_data_encoded,
        "mime_type": "application/pdf",
    }

Then this self.file is used here :

entity_stix["x_opencti_files"] = (
    [self.file] if self.file is not None else []
) 

This connector has been updated recently, I'm not sure yet how to fix this behavior @richard-julien @SamuelHassine

=> Actually I might have a fix, opening PR soon

from connectors.

SouadHadjiat avatar SouadHadjiat commented on July 26, 2024

PR open here in connectors : #2141

from connectors.

SouadHadjiat avatar SouadHadjiat commented on July 26, 2024

To precise the issue : the report will contain the last uploaded file from global import, not a random one. To reproduce, you need to first upload a file (import global), import it to create a workbench, then you import a file in a report and create a workbench from this report, and when validating this report workbench, it will add to the report the last uploaded file in global.

from connectors.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.