-
Notifications
You must be signed in to change notification settings - Fork 177
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
unhelpful error handling for integrity keys #570
Comments
Would you like to send a PR? |
I'm not sure what changed in the past week or two, but our CI/CD is now breaking due to this error. Apparently the solution is to manually update Snatched from the other issue, the following resolves the issue:
This allowed me to successfully active
This makes sense give OpenJS's decision to remove Here's the logs from the original issue:
|
There should probably be a review between npm registry and Corepack to see if anything can be done to prevent this type of issue from occurring again.
|
Thanks @MikeMcC399! @aep-sunlife I think we can safely close this 👍 |
I don't think this issue should be closed, because it is about presenting a more readable error message. |
When connecting corepack to a custom NPM registry such as Artifactory, then corepack presents unhelpful error messages about JSON objects missing keys.
This error is far too low level to communicate to the user what the real problem is: corepack is presently configured to expect packages to be signed by integrity keys, but the signatures are either missing or do not match the configured integrity keys.
Additionally, squirreled away in GitHub issues is a tip about setting a
COREPACK_INTEGRITY_KEYS
environment variable. To a blank, empty string. Or to zero. Or to false.It would be helpful for error messages about integrity mismatches to link to a dedicated corepack integrity key documentation page. The page should explain loudly, clearly, and early, that in practice, integrity violations may indicate a middle man attack injection malware into any packages downloaded via corepack and/or yarn.
Secondly, the documentation page should show the correct syntax for configuring actual integrity keys.
Third, the documentation page should pick just one value, e.g. blank string (
""
) to indicate when the user chooses to exlicitly disregard integrity checks. This option should come with a warning that disabling integrity checks invites malware.The text was updated successfully, but these errors were encountered: