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

we need to talk about jimp #17170

Closed
boneskull opened this issue Jul 8, 2022 · 9 comments
Closed

we need to talk about jimp #17170

boneskull opened this issue Jul 8, 2022 · 9 comments
Labels
Dependencies issues with dependencies Plugin Regarding an official plugin

Comments

@boneskull
Copy link
Contributor

The problem

Jimp is unmaintained and contains "high severity" vulnerabilities in its dependencies. Both @appium/images-plugin and @appium/opencv depend upon Jimp.

Let's assume no security or bugfixes are forthcoming. We will need to take action (though I'm unclear on the urgency), and have some options:

  1. Offer to maintain Jimp. This makes sense if we think we have the bandwidth to do so (probably not) and we have the domain knowledge (I don't, but maybe someone else does).
  2. Replace Jimp with something else. Options include (but are not limited to) sharp and... I am not sure what else. image-js is a pure-JS solution which sounds promising, but is not popular. sharp is a native module, which may make installation painful. However, it seems to be well-maintained--and they publish binaries for M1 Macs--so maybe it won't be so bad.
  3. Research the feasibility of copy/pasting our way out of it by pulling the bits we need from Jimp and its dependencies.

From here, replacing it with sharp seems like a reasonable option, but will likely be a not-insignificant effort due to needing to refactor everything to work with its API.

@boneskull boneskull added Dependencies issues with dependencies Plugin Regarding an official plugin labels Jul 8, 2022
@boneskull
Copy link
Contributor Author

If we do go the sharp route, #16992 should be abandoned entirely

@jlipps
Copy link
Member

jlipps commented Jul 12, 2022

I like the idea of moving to a more maintained module, however building native extensions has been an issue in the past (a severe issue with opencv4nodejs) so I'd want to make sure Sharp builds easily and without issue on all the os/node versions we expect, with no user fiddling.

@boneskull
Copy link
Contributor Author

I'd say then if we were to attempt to adopt sharp, adding mac intel & ARM (along w/ windows) to the CI matrix would be a requirement.

@boneskull
Copy link
Contributor Author

...a problem with that is GH does not offer ARM Macs and we'd have to self-host a machine. Feel like throwing down for a mac mini?

@jlipps
Copy link
Member

jlipps commented Jul 25, 2022

how easy is it to add a custom executor to a github CI job? is it even possible to throw our own hardware at it?

@AT1990
Copy link

AT1990 commented Aug 31, 2022

I could not figure out what is the solution to my problem #17433 by looking at this ticket and mine has been already closed as a duplicate. Can some one please help me out here as I am still stuck with those 8 vulnerabilities and because of that even "Appium" is not getting recognised as internal or external command

@crutchcorn
Copy link

FWIW, Jimp is becoming more maintained as-of late. There's a new call for maintainers, which has been getting a fair bit of response (including from myself).

jimp-dev/jimp#1128

This is not to say that it's perfect or will be solved overnight, but that we're working on it and hope to improve it over time

@boneskull
Copy link
Contributor Author

@crutchcorn Thanks for the heads-up. I'll keep an eye on it. I'm not sure I love the idea of a "total rewrite" as tossed around in that issue, but this reduces the urgency to migrate away (not that there was a ton of urgency in the first place).

@mykola-mokhnach
Copy link
Collaborator

No jimp - no talk ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies issues with dependencies Plugin Regarding an official plugin
Projects
None yet
Development

No branches or pull requests

5 participants