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

allow user disable electron's sandbox #22

Merged
merged 1 commit into from
Jan 16, 2020
Merged

Conversation

bruceauyeung
Copy link
Contributor

@bruceauyeung bruceauyeung commented Jan 15, 2020

why user need to disable electron's sandbox :

  1. users want to run jest/jest-electron as root. without --no-sandbox option for electron , test cases will fail silently because jest-electron failed to spawn an electron process
  2. Users of cypress have reported that the new Electron v5 seems to require --no-sandbox flag even when running as a regular non-root user. see Always use --no-sandbox with Electron on non-Windows system cypress-io/cypress#5458 (comment)

security impact:

malicious javascript codes running within electron's renderer process are not sandboxed anymore and have the ability to harm the system. but here in jest test cases are trusted codes, so i think security impact is trivial.

who disables electron's sandbox on non-windows platform by default:

1, vscode. see microsoft/vscode#81096
2, cypress. see cypress-io/cypress#5458

fixes #19

@hustcc hustcc merged commit 29fabe2 into hustcc:master Jan 16, 2020
@hustcc
Copy link
Owner

hustcc commented Jun 9, 2020

@bruceauyeung do the latest version of electron supports --no-sandbox ? I will upgrade electron to latest version.

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.

failed to integrate with vue-cli-service/typescript/babel/typescript/jest
2 participants