Apply file transfer restrictions to the integrated browser
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript, vscode
調査の方向性
まず、code-server インターフェースで既存のファイル転送制限の処理と統合ブラウザーのエントリーポイントを見つけます。ブラウザーのアップロードとダウンロードがローカルクライアントとリモートサーバーのどちらに到達するのかを追跡し、その境界を越える転送がブロックされる一方で、サーバー上だけで実行される操作は引き続き許可されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
What is your suggestion?
I would like code-server to apply the same file transfer restrictions to the integrated browser available directly inside the VS Code/code-server interface.
Today, code-server can restrict actions such as drag-and-drop, file download, and file upload between the user's local machine and the remote code-server environment. However, the integrated browser inside the interface should also respect these restrictions.
If file transfer is disabled, the integrated browser should not allow users to bypass the restriction by downloading files to their local machine or uploading files from their local machine.
However, the browser should still be allowed to download or upload files only within the remote server environment. For example:
- downloading a file from a website should be allowed only if the destination is a folder on the remote server;
- uploading a file should be allowed only if the file comes from the remote server filesystem;
- uploading or downloading directly between the integrated browser and the local client machine should remain blocked when file transfer restrictions are enabled.
In short, the restriction should prevent transfers outside of the server, but should still allow file operations that stay entirely inside the server environment.
Why do you want this feature?
This would improve security and make file transfer restrictions consistent across the whole code-server interface.
In managed or restricted environments, administrators may disable drag-and-drop, file downloads, and file uploads to prevent data from being moved between the remote server and the local user device.
If the integrated browser can still upload files from the local machine or download files to the local machine, users may be able to bypass these restrictions. This weakens the security model and makes the existing restrictions less effective.
The expected behavior would be:
- local machine to server transfer: blocked when upload is disabled;
- server to local machine transfer: blocked when download is disabled;
- server-only file operations through the integrated browser: allowed.
This would be useful for enterprise, education, sandbox, and controlled development environments where administrators need strong control over data movement.
Are there any workarounds to get this functionality today?
There does not seem to be a clean native workaround today.
Possible workarounds may include disabling the integrated browser entirely, using proxy or network-level restrictions, or maintaining custom patches, but these approaches are not ideal. They can be difficult to maintain, may break legitimate workflows, and do not provide a clear policy-based way to enforce the same restrictions everywhere in code-server.
A native option would be much better because it would make the behavior predictable and consistent with the existing file transfer restrictions.
Are you interested in submitting a PR for this?
Not at the moment, but I would be happy to provide more details, test the behavior, or validate a proposed implementation in a restricted code-server environment.
- 主要言語
- TypeScript
- スター
- 79.4k
- フォーク
- 6.9k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 39
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/code-server のほかの issue
-
security
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
coder/code-server#8013 · コメント 3 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
coder/code-server#7976 · コメント 2 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
coder/code-server#7962 · コメント 3 件 ·
-
bug needs-investigation
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
coder/code-server#7955 · コメント 1 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
coder/code-server#7948 · コメント 1 件 · リアクション 2 件 ·