0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-22 07:37:56 +01:00

doc: emphasize security warning in vm module doc

Refs: https://github.com/nodejs/node/issues/40718

PR-URL: https://github.com/nodejs/node/pull/41916
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Rich Trott 2022-02-12 09:09:13 -08:00 committed by GitHub
parent 30c742fe12
commit 86fba23b1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -9,8 +9,10 @@
<!-- source_link=lib/vm.js -->
The `vm` module enables compiling and running code within V8 Virtual
Machine contexts. **The `vm` module is not a security mechanism. Do
not use it to run untrusted code.**
Machine contexts.
<strong class="critical">The `vm` module is not a security
mechanism. Do not use it to run untrusted code.</strong>
JavaScript code can be compiled and run immediately or
compiled, saved, and run later.

View File

@ -11,6 +11,7 @@
--red1: #d60027;
--red2: #d50027;
--red3: #ca5010;
--red4: #ff7070;
--green1: #3e7a38;
--green2: #5a8147;
--green3: #64de64;
@ -29,6 +30,7 @@
--background-color-highlight: var(--white-smoke);
--color-brand-primary: var(--gray6);
--color-brand-secondary: var(--green1);
--color-critical: var(--red1);
--color-fill-app: var(--white);
--color-fill-side-nav: var(--gray6);
--color-links: var(--green1);
@ -40,6 +42,7 @@
.dark-mode {
--background-color-highlight: var(--black2);
--color-critical: var(--red4);
--color-fill-app: var(--black1);
--color-fill-side-nav: var(--black3);
--color-links: var(--green5);
@ -165,6 +168,10 @@ em code {
line-height: 1.5rem;
}
.critical, .critical code {
color: var(--color-critical);
}
li.version-picker {
position: relative;
}