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

Validate signatures for extensions downloaded from OpenVSX #5792

Open
jmcphers opened this issue Dec 18, 2024 · 0 comments
Open

Validate signatures for extensions downloaded from OpenVSX #5792

jmcphers opened this issue Dec 18, 2024 · 0 comments
Labels
area: core Issues related to Core category. security

Comments

@jmcphers
Copy link
Collaborator

Currently, Positron does not validate signatures of extension packages downloaded from OpenVSX. We should add signature validation as a security measure.

Note that other VS Code forks generally do not perform this validation. VSCodium, for instance, has a patch similar to Positron's that disables validation. https://github.com/VSCodium/vscodium/blob/3a9708856a49ec893f044673c547d2f0e54be3d4/patches/disable-signature-verification.patch#L11

OpenVSX uses a different mechanism than Microsoft does and the signatures are not compatible. This means that some changes are necessary to the signature validation code, which has a hardcoded dependency on @vscode/vsce-sign (a proprietary Microsoft binary that verifies signatures generated by the official VS Code extension marketplace). There's a long thread on signatures in OpenVSX here:

eclipse/openvsx#543

They implemented signature verification last year:

eclipse/openvsx#673

In order to validate extensions installed from OpenVSX, we can use node-ovsx-sign:

https://www.npmjs.com/package/node-ovsx-sign/v/0.6.1

This appears to be used already by Coder and Gitpod.

@jmcphers jmcphers added security area: core Issues related to Core category. labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to Core category. security
Projects
None yet
Development

No branches or pull requests

1 participant