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

Add security standard: No use of requests to download Python code/libraries for use in modules #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

teward
Copy link

@teward teward commented Jan 14, 2025

This is in the same spirit as the restriction of not allowing pip calls via subprocess calls.

The reason this is being suggested now is due to this observation of a module in the ComfyUI registry doing just this - using requests to download Python code from a separate repository and then write those files and then in the same module usage, import that library. This is dangerous because it is unvetted / unauditable code. https://github.com/1038lab/ComfyUI-OmniGen/blob/4f9d6a945e3fa7aaf4485c4e7c5292c9b4826ab7/ailab_OmniGen.py#L76

…ibraries for use in modules

This is in the same spirit as the restriction of not allowing `pip` calls via `subprocess` calls.

The reason this is being suggested now is due to this observation of a module in the ComfyUI registry doing just this - using `requests` to download Python code from a separate repository and then write those files and then in the same module usage, import that library.  This is dangerous because it is unvetted / unauditable code.  https://github.com/1038lab/ComfyUI-OmniGen/blob/4f9d6a945e3fa7aaf4485c4e7c5292c9b4826ab7/ailab_OmniGen.py#L76
@christian-byrne
Copy link
Contributor

@teward Would you be willing to write an RFC for this in https://github.com/Comfy-Org/rfcs?

@teward
Copy link
Author

teward commented Jan 14, 2025

@teward Would you be willing to write an RFC for this in https://github.com/Comfy-Org/rfcs?

Yep, just make sure I hiave access to the RFCs repository so I can submit. Or if you need me to do a PR for that I can. It'll be after work though so gotta give me some time to get to it.

@teward
Copy link
Author

teward commented Jan 14, 2025

@christian-byrne Comfy-Org/rfcs#12

FYI refer to Discord pings though we need an RFC ID reservation program / tooling if we want to adopt this because otherwise we'll run into RFC numbering conflicts potentially

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants