-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Is there a way to disable the terminal? #1937
Comments
There's no way to disable it at the moment so we'd need to add it. The terminal requests are handled via the extension host protocol. The server-side implementation is in lib/vscode/src/vs/workbench/api/node/extHostTerminalService.ts so maybe we could just throw errors if those methods are called and terminals are disabled. Terminals are used for debugging as well so doing this will also disable debugging. In terms of the UI I think it might be better to leave everything in and show a message when trying to access the disabled functionality. Something like "terminals have been disabled" just to prevent anyone from thinking the missing terminals are a bug or something like that especially if they're familiar with VS Code already. For the terminal we can write a message in lib/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts by adding an You might have already considered this but just in case you'll also probably need to disable installing new extensions (or whitelist extensions in some way) and make the extensions directory read-only (or restrict the file picker, see #1834) so users can't add an extension that just bypasses all this and gives them access to run commands on the system. Depending on your goal it might be easier to run code-server in some kind of jail but I think we plan on doing this for collaboration eventually anyway (we'd disable all the "dangerous" stuff for the guests) so it wouldn't be bad to get a start on it. |
Any updates? |
No work has been done here yet.
|
Regarding the security aspect, also consider the VS Code tasks system, Git hooks, and probably a lot more. The attack surface here is extremely large. |
Any updates? |
No updates. For now it's still in the backlog and I think it's unlikely
we will get to it any time soon.
|
Any update? |
No, the issue is still on the backlog.
|
If someone picks this up here are some investigation notes: #6138 (comment) |
In Linux you could use
|
Hi. I was wondering if it was possible to disable the terminal. This would involve both removing from the UI and preventing terminal requests from being processed by the server. Or if you could direct me to the part of the code where terminal requests are handled, that would be helpful. I've been looking at the code for a few days now, but am finding the execution flow very difficult to follow. Thx.
The text was updated successfully, but these errors were encountered: