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

Docs: add section with suggestions relating to security (includes relaxing defaults for trusted input) #4098

Open
Jontes-Tech opened this issue May 12, 2024 · 1 comment

Comments

@Jontes-Tech
Copy link

Question about an existing feature

Running Sharp on user-generated content

What are you trying to achieve?

A service which allows arbitrary user input of files, then converted to webps

When you searched for similar issues, what did you find that might be related?

Tons of people seem to use Sharp for such a purpose, but I'm not sure if I'm missing a step. Running something like this on arbitrary data seems scary at best. I am running it in a kubernetes pod.

@lovell
Copy link
Owner

lovell commented May 16, 2024

The short answer is that the default settings are generally safe for untrusted input. Decompression memory consumption is probably the biggest risk, but this can be managed e.g. via cgroups.

libvips and its "web" dependencies (i.e. those used by sharp) are continuously fuzz-tested. All found/reported security issues are fixed and co-ordinated releases are scheduled ahead of details being made public.

I'm going to switch this issue to an enhancement as I think the longer answer, when written, is worth adding to the docs.

@lovell lovell changed the title Question: Possible safety risks Docs: add section with suggestions relating to security (includes relaxing defaults for trusted input) May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants