-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Lock down file browser to certain directory #86
Comments
Interesting. Wouldn't someone be able to use the terminal to break out anyways? For a jailed session, I'd recommend running a docker container with the project directory mounted in. |
Yeah, I already thought about having containers for each terminal. |
Also consider to switch to another docker base image when implementing this (node / alpine), it should be fully decoupled from the VS code terminals. |
What about using systemd to lock down the session? Systemd is very powerful at that, it's even possible to set some parameters to protect against a fork bomb:
systemd nspawn would be also a great tool to easily lock down the session: https://wiki.archlinux.org/index.php/systemd-nspawn |
I don't think you should rely on the system having SystemD installed. Also, using the project scaled across a cluster would be way easier with docker/kubernetes integration. |
I didn't mean to only use systemd, we could provide several type of config for the user. |
I don't think its appropriate to implement this as part of code-server. You can always deploy the docker image and only mount the directory you want edited. |
I can use the docker image, which also allows me to kill the server inside the docker container. When hosting this for others to use, it's a big downside, especially when the multi-user feature gets implemented. |
You can build a custom docker image based on the existing image. See docker's We can evaluate docker containers as terminals in a different issue. This issue was about locking vscode server down which I think is out of scope. You can put it in a VM or a container easily if you want an isolated environment. |
Being able to browse / in a docker container might be unwanted behavior.
I'd like to set an environment variable which locks the file/folder browser to a certain directory, such as /data/projects, etc.
The text was updated successfully, but these errors were encountered: