-
Notifications
You must be signed in to change notification settings - Fork 456
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
Define in the user preferences a list of file hashes to be trusted when jar files are added to the classpath of jdt.ls #1965
Comments
Just a few workaround to consider before we look at providing some kind of trusted resource store :
As you've discovered in https://github.com/redhat-developer/vscode-java/blob/master/src/settings.ts#L141-L158 , when the workspace settings contain javaagent in
From https://github.com/redhat-developer/vscode-java/blob/master/src/settings.ts#L141-L158 , the property written to globalState to skip the security check when javaagent is defined in workspace settings, is :
where the globalState is usually the sqlite database at I'm fairly certain (2) isn't easy to do, but (1) seems possible. If neither work, we can probably look at some kind of trustedHash setting like we do for vscode-xml. |
hi @rgrunber. About the global storage workaround, we could hack it, but I doubt my PR would be accepted ;) |
I see a problem with this though (unless I'm missing some piece of info). If you can only configure workspace settings, then we have to allow "trustedHashes" as a workspace setting. But then any workspace could just provide a settings file that self-approves its own content. The purpose of user settings is to prevent this. Even if you look in https://github.com/redhat-developer/vscode-xml/blob/master/package.json#L147 (for the xml trustedhashes), we don't allow this to be set as a workspace setting (application scope). |
I don't think the workspace scope is about self approving or not. it's would just apply the settings for a workspace which is a collection of Having that said, for our usecase, maybe it should be done in the application scope. But I am not sure it is implemented on our side. |
The case we're trying to guard against is a user importing a folder (eg. git cloned) they don't fully trust, that contains a Is such a case possible in Che if a user requests to create their workspace from a cloned project that contains a settings file at the root ? |
if this is the only use case, could we just show this popup if the jar file is located in the project folders ? |
In Che we load everything from a devfile.yaml file that is located in the root project anyway. The difference is that all these are running in isolated pod in the cloud and not in your local laptop with all your sensitive personal data. |
I think a good compromise would be what you suggested, to confirm that the path provided by javaagent corresponds to a file that is not provided by the workspace. |
Thanks Roland, that would work for us |
- Fixes redhat-developer#1965 Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- Fixes redhat-developer#1965 Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- Fixes redhat-developer#1965 Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- Fixes redhat-developer#1965 Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- Do not show prompt if the workspace is already trusted - Fixes redhat-developer#1965 Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- Do not show prompt if the workspace is already trusted - Fixes redhat-developer#1965 Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- Fixes redhat-developer#1965 Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- Fixes #1965 Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
[provide a description of the issue]
Environment
Steps To Reproduce
When we add a jar file in the classpath like
a Security Warning is popping up and this is an issue in Che the option is not persisted in the user preferences (but in the global state which is gone when starting a new workspace).
For security reasons, we would like to provide a list of jar files that can be trusted in the preferences.
Would be something similar to https://github.com/redhat-developer/vscode-xml/blob/985705ebd603bd08ee8ca149484d3ea48841007a/docs/Preferences.md#trusted-binary-hashes
[Please attach a sample project reproducing the error]
Please attach logs
Current Result
Expected Result
Additional Informations
The text was updated successfully, but these errors were encountered: