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

Encryption: support preload script #40

Open
sleeyax opened this issue May 20, 2022 · 2 comments
Open

Encryption: support preload script #40

sleeyax opened this issue May 20, 2022 · 2 comments
Labels
feature New feature

Comments

@sleeyax
Copy link
Owner

sleeyax commented May 20, 2022

From the electron docs:

string (optional) - Specifies a script that will be loaded before other scripts run in the page. This script will always have access to node APIs no matter whether node integration is turned on or off. The value should be the absolute file path to the script. When node integration is turned off, the preload script can reintroduce Node global symbols back to the global scope.

Asarmor currently doesn't support preload scripts because they run before decryption of the render process occurred.

It would be nice if we could do the decryption within the preload script instead. That way we should also be able to disable nodeIntegration, which increases overall security as well. If that's not possible, it would be nice to at least support preload scripts one way or the other, because now they just don't work at all - or mention it's a caveat in README.md.

@JonJon565
Copy link

Hi @sleeyax how do i prevent the preload.js from being encrypted?

@sleeyax
Copy link
Owner Author

sleeyax commented Aug 7, 2024

Hi @sleeyax how do i prevent the preload.js from being encrypted?

As clearly stated in this issue, preload scripts are NOT SUPPORTED. So, for now, you can't prevent it from being encrypted. Don't use preload scripts at all if you can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants