-
Notifications
You must be signed in to change notification settings - Fork 13.1k
feat: use isolated-vm to run integration scripts #30229
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
Conversation
🦋 Changeset detectedLatest commit: 955b37d The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report
@@ Coverage Diff @@
## develop #30229 +/- ##
===========================================
+ Coverage 50.23% 50.29% +0.05%
===========================================
Files 780 775 -5
Lines 14476 14459 -17
Branches 2617 2613 -4
===========================================
Hits 7272 7272
+ Misses 6809 6780 -29
- Partials 395 407 +12
Flags with carried forward coverage won't be shown. Click here to find out more. |
…ion to block frozen engines from being used
Co-authored-by: Marcos Spessatto Defendi <[email protected]>
86f6f54
9df7d2f to
a073151
Compare
Co-authored-by: Marcos Spessatto Defendi <[email protected]> Co-authored-by: Tasso Evangelista <[email protected]>
…ove/iframeLogin * 'develop' of github.com:RocketChat/Rocket.Chat: (33 commits) feat: New records page analytics tab (#30373) chore: Changing some key translations - Setup Wizard (#30462) feat: use isolated-vm to run integration scripts (#30229) fix: do not broadcast events from the local node to the local service (duplicated event) (#30446) fix: Microsoft autotranslate not working (#30390) chore: `ResetPasswordPage` a11y improvements (#30479) chore: `ResetPasswordForm` a11y improvements (#30476) chore: Move bad words filter callback to service (#30241) fix: Message disappears from room after deletion even if "Show Deleted Status" is enabled (#30452) chore: add tooltip to mentions (#30445) chore: bump mongo deps (#30450) ci: patch mongo type definitions (#30449) chore: cache incremental ts check (#30447) Release 6.4.0-rc.4 Release 6.4.0-rc.3 chore: update meteor 2.13.0 (#29989) chore: Assertion accuracy on registration test (#30440) ci: Add step to notify external services about a new release after Docker image publish (#30436) regression: close button not working on contact history (#30432) regression: custom fields not showing in current chats (#30428) ...
…/mentionBot * 'develop' of github.com:RocketChat/Rocket.Chat: chore: move Omnichannel toolbox section from sidebar room list (#30502) fix: RTL lang crashes Moderation Console (#30393) feat: New records page analytics tab (#30373) chore: Changing some key translations - Setup Wizard (#30462) feat: use isolated-vm to run integration scripts (#30229) fix: do not broadcast events from the local node to the local service (duplicated event) (#30446) fix: Microsoft autotranslate not working (#30390) chore: `ResetPasswordPage` a11y improvements (#30479) chore: `ResetPasswordForm` a11y improvements (#30476) chore: Move bad words filter callback to service (#30241) fix: Message disappears from room after deletion even if "Show Deleted Status" is enabled (#30452) chore: add tooltip to mentions (#30445)
Co-authored-by: Marcos Spessatto Defendi <[email protected]> Co-authored-by: Tasso Evangelista <[email protected]>
Co-authored-by: Marcos Spessatto Defendi <[email protected]> Co-authored-by: Tasso Evangelista <[email protected]>
Proposed changes (including videos or screenshots)
This PR adds an option on the webhooks form to select if the custom script should be executed in secure or compatible mode. Compatible mode will continue to use vm2 to run the scripts, while the secure mode will use isolated-vm instead.
Old scripts written for vm2 should mostly be compatible with isolated-vm as well, but we've taken this opportunity to also limit what's available on the script sandbox so some internal functions that are available to vm2 will be undefined for scripts running on isolated-vm.
The envvars that manage custom scripts now also support specifying only one of the scripts engine, with the values "vm2" and "ivm".
So if the envvar FREEZE_INTEGRATION_SCRIPTS is set to "vm2", use of isolated-vm will be mandatory for new or modified scripts, but vm2 will continue to work for older scripts that have not been modified.
Once you change a script to run in isolated-vm you can no longer switch back to vm2 if vm2 is frozen.
If DISABLE_INTEGRATION_SCRIPTS is set to "vm2", those scripts will be ignored and only scripts set to isolated-vm will be executed.
Issue(s)
https://rocketchat.atlassian.net/browse/ARCH-1167
Steps to test or reproduce
Further comments