Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub CVE warning for flask #6

Open
MichaelTiemannOSC opened this issue May 2, 2023 · 8 comments
Open

GitHub CVE warning for flask #6

MichaelTiemannOSC opened this issue May 2, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@MichaelTiemannOSC
Copy link

GitHub warns that flask < 2.3.2 in requirements.txt suffers from CVE-2023-30861. flask ~> 2.3.2 is a fix (but may require other libraries be updated, depending on dependencies).

@HeatherAck

@MichaelTiemannOSC MichaelTiemannOSC added the bug Something isn't working label May 2, 2023
@MichaelTiemannOSC
Copy link
Author

GitHub sent another ping about this. Can you please fix in the various branches? Thanks!

@DaBeIDS
Copy link
Collaborator

DaBeIDS commented May 12, 2023

I started to test the new flask version.
For the rule-based-docker we can change to Flask 2.3.2
For the model and extraction docker there seems to be an issue, maybe due to the Python version underlying the Pytorch Image.

image

I checked the error message and for Flask < 2.2,5 we can also use version 2.2.5 as a solution:

image

I will test that next and hope that this will work. Let you know afterwards.

Test details:
Build Docker on Open Shift and see if issues in the creation pop up.

@MichaelTiemannOSC
Copy link
Author

Thanks so much! If 2.2.5 does the job, we can move conservatively at first, and then when we have the new ODH environment (which will upgrade LOTS of dependencies) we can see how much needs to be done to upgrade to 2.3.2 (or later).

@DaBeIDS
Copy link
Collaborator

DaBeIDS commented May 12, 2023

Hi Michael,
unfortunately flask 2.2.5 has the following dependency on werkzeug:
image

On the other hand we use farm 0.5.0 which has the fixed dependecy:

image

Obviously farm is important for us and so we have here an unresolvable issue in the moment.

Unfortunately we can not just upgrade farm in the moment as we can not test which version is compatible as we can still not run a full train_on_pdf.py. We will think about how we could resolve the issue. One solution could be to just drop flask completely and run everything in one docker file. Maybe discuss on wednesday.

@DaBeIDS
Copy link
Collaborator

DaBeIDS commented May 12, 2023

Hi Michael,
i just checked. Even the newest version of farm has the requirement Werkzeug==0.16.1.
There was also a discussion in the past about that:

deepset-ai/FARM#764

Seems that this is a real showstopper for the new flask version.
So we have to think about another solution...

@MichaelTiemannOSC
Copy link
Author

Thanks for your continued diligence into this problem. Maybe it's time to take the past discussion to heart and either switch from Farm to Haystack or consider other methods for training models. @Shreyanand how have folks on your team dealt with this question?

@Shreyanand
Copy link
Member

@MichaelTiemannOSC thanks for the tag! We have not encountered the exact Flask problem in this issue but when we were implementing the sparsity models, we ran into incompatibilities with the old Farm version. In order to train the sparse models, we had to port the training and inference code to use the Huggingface transformers package. The notebook here shows how it can work in this use case.
Haystack is built on top of transformers so it may be easier to develop with but the original transformers package does offer more flexibility and easy integrations with other frameworks. Hope that helps.

@ModeSevenIndustrialSolutions
Copy link
Contributor

Think this issue needs some priority; I will try and talk to Michael about it this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants