-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
Improve VSCode SecretStorage documentation to highlight capablities and limitations #213903
Comments
I put a similar request in electron/electron#42318 as it is the underlying implementation and logical next step for a user to go. |
Hi @datosh 👋 this makes good sense to me. I'd review a PR of the first draft.
|
Sorry that this took a while, @TylerLeonhardt. The following line...
made me think that you might be unaware of the security properties of Electrons SafeStorage API. Therefore I played it safe and reached out to MSRC before posting more detailed information. This process is now complete. So: As part of a week of security research @wakeward and I figured out how an extension can read the VSCode sqlite3 db (which stores the encrypted values), as well as read from the keyring and then decrypt/read all the secrets from other extensions. To do this, there is no need to talk to the electron API, but simple file reads and decryption in JS/TS. We have documented our findings in a blog post and have also released the PoC extension for folks to test and play around with. I think the VSCode extension API documentation should be very clear that the provided secret manager is not able to protect the secrets from any other extension or even applications on the same system. It does provide protection when using a multi-user system (when backed by libsecret), but this is nowhere reflected in the docs, and might simply be lost in translation when going from Chrome -> Electron -> VSCode
Awesome - I was able to very this. I wasn't aware, but that is pretty cool and great UX! |
I can't speak to the sandboxing... but I believe this is the issue related to it #202385 keep an eye on that. I think documenting this is a bit tricky because:
So, to document this correctly I think it's important to:
I'll make a first pass at this, but I'd love to know your thoughts. |
The documentation for SecretStorage is very minimal and does not assist extension developers to make informed decisions about the the security trade-offs they are making. It currently reads:
"Represents a storage utility for secrets, information that is sensitive."
The store function provides little additional information:
"Store a secret under a given key."
I propose that the documentation should be extended to help developers answer the following questions:
Let me know if you agree with this feedback and see the value. I am super happy to also provide a first draft to update the documentation accordingly.
/cc @TylerLeonhardt
The text was updated successfully, but these errors were encountered: