Skip to content

Commit ed01b38

Browse files
devsnektargos
authored andcommitted
doc: use stronger language about security of vm
PR-URL: #23198 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: John-David Dalton <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 2da6f62 commit ed01b38

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/vm.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
<!--name=vm-->
88

99
The `vm` module provides APIs for compiling and running code within V8 Virtual
10-
Machine contexts.
10+
Machine contexts. **Note that the `vm` module is not a security mechanism. Do
11+
not use it to run untrusted code**. The term "sandbox" is used throughout these
12+
docs simply to refer to a separate context, and does not confer any security
13+
guarantees.
1114

1215
JavaScript code can be compiled and run immediately or
1316
compiled, saved, and run later.
@@ -40,9 +43,6 @@ console.log(sandbox.y); // 17
4043
console.log(x); // 1; y is not defined.
4144
```
4245

43-
**The vm module is not a security mechanism. Do not use it to run untrusted
44-
code**.
45-
4646
## Class: vm.SourceTextModule
4747
<!-- YAML
4848
added: v9.6.0

0 commit comments

Comments
 (0)