Skip to content
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

feat: sandboxを有効化 #2074

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sabonerune
Copy link
Contributor

@sabonerune sabonerune commented May 11, 2024

内容

プロセスのサンドボックス化を有効化してセキュリティを向上させます。
ref: https://www.electronjs.org/ja/docs/latest/tutorial/sandbox

関連 Issue

その他

preload.jsが分割されていることがそのまま動かすことができないことの原因でした。
https://electron-vite.github.io/guide/preload-not-split.html

#2071 (comment) で触れて作業を開始したのですが本当に直接的に関係なかったかもしれません。
--no-sandboxを付けてもpreload.jsが分割された状態では正常に動作しませんし、この機能を有効化してもUbuntu24.04(VirtualBox上)で--no-sandboxを付けて起動させることができました。

Comment on lines -388 to -405
nodeIntegration: false,
contextIsolation: true,
sandbox: false, // TODO: 外しても問題ないか検証して外す
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

全部デフォルトはセキュアな方になっているので削除します。

@sabonerune sabonerune marked this pull request as ready for review May 11, 2024 13:54
@sabonerune sabonerune requested a review from a team as a code owner May 11, 2024 13:54
@sabonerune sabonerune requested review from Hiroshiba and removed request for a team May 11, 2024 13:54
@sabonerune sabonerune force-pushed the feat/enable-sandbox branch 2 times, most recently from fcebf91 to 8c624f0 Compare May 14, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nodeIntegrationを無効にする&sandbox=trueにする
1 participant