Skip to content

Commit 5ec1a20

Browse files
Trottbengl
authored andcommitted
doc: emphasize security warning in vm module doc
Refs: #40718 PR-URL: #41916 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Derek Lewis <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent eb2f821 commit 5ec1a20

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

doc/api/vm.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
<!-- source_link=lib/vm.js -->
1010

1111
The `vm` module enables compiling and running code within V8 Virtual
12-
Machine contexts. **The `vm` module is not a security mechanism. Do
13-
not use it to run untrusted code.**
12+
Machine contexts.
13+
14+
<strong class="critical">The `vm` module is not a security
15+
mechanism. Do not use it to run untrusted code.</strong>
1416

1517
JavaScript code can be compiled and run immediately or
1618
compiled, saved, and run later.

doc/api_assets/style.css

+7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
--red1: #d60027;
1212
--red2: #d50027;
1313
--red3: #ca5010;
14+
--red4: #ff7070;
1415
--green1: #3e7a38;
1516
--green2: #5a8147;
1617
--green3: #64de64;
@@ -29,6 +30,7 @@
2930
--background-color-highlight: var(--white-smoke);
3031
--color-brand-primary: var(--gray6);
3132
--color-brand-secondary: var(--green1);
33+
--color-critical: var(--red1);
3234
--color-fill-app: var(--white);
3335
--color-fill-side-nav: var(--gray6);
3436
--color-links: var(--green1);
@@ -40,6 +42,7 @@
4042

4143
.dark-mode {
4244
--background-color-highlight: var(--black2);
45+
--color-critical: var(--red4);
4346
--color-fill-app: var(--black1);
4447
--color-fill-side-nav: var(--black3);
4548
--color-links: var(--green5);
@@ -165,6 +168,10 @@ em code {
165168
line-height: 1.5rem;
166169
}
167170

171+
.critical, .critical code {
172+
color: var(--color-critical);
173+
}
174+
168175
li.version-picker {
169176
position: relative;
170177
}

0 commit comments

Comments
 (0)