-
Notifications
You must be signed in to change notification settings - Fork 37
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
NodeJS checksum not being verified after downloading via the npm plugin #717
Comments
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2852.
|
Can you talk about this customization in your specific case? One way to bypass this issue altogether would be to improve the plugin so that it does what you need it to do without having to override steps. |
Talked with @tigarmo in PMs. I did not know about However, I believe the second part of this issue (downloading NodeJS without running a checksum) still persists. So I renamed it, and I will leave this open. |
Fixed by PR #719 |
Bug Description
Problem 1 (solved; see below)
The
npm
plugin installs NodeJS during the build step:craft-parts/craft_parts/plugins/npm_plugin.py
Lines 179 to 197 in 2b16c15
When building a ROCK, if we use
override-build
to customize the invocation ofnpm install
as needed by our application, we don't get NodeJS installed. So we have to either download and install NodeJS ourselves, or resort to hacks like building the application during the stage step.For building this ROCK, we found a nice workaround using
overlay-script
, which is good enough for us for now to install NodeJS independently:Problem 2
Somewhat related to this: the download of NodeJS should also ideally have its checksum verified to mitigate the impacts of any supply-chain-attacks and eliminate the problem of corrupted downloads, maybe doing something similar to what Docker does:
https://github.com/nodejs/docker-node/blob/1fc16c3d1ea2be71fba69115f59d0e8f99876692/18/buster/Dockerfile
To Reproduce
Try to try to build any application whose
npm install
process needs to be customized to be different from the default dictated by the part.part yaml
No response
Relevant log output
The text was updated successfully, but these errors were encountered: