Skip to content

Commit 8a06b44

Browse files
committed
doc: emphasize security warning in vm module doc
Refs: #40718
1 parent bd86e51 commit 8a06b44

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

doc/api/vm.md

Lines changed: 4 additions & 2 deletions
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+
<span class="critical">The `vm` module is not a security
15+
mechanism. Do not use it to run untrusted code.</span>
1416

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

doc/api_assets/style.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
--background-color-highlight: var(--white-smoke);
3030
--color-brand-primary: var(--gray6);
3131
--color-brand-secondary: var(--green1);
32+
--color-critical: var(--red1);
3233
--color-fill-app: var(--white);
3334
--color-fill-side-nav: var(--gray6);
3435
--color-links: var(--green1);
@@ -40,6 +41,7 @@
4041

4142
.dark-mode {
4243
--background-color-highlight: var(--black2);
44+
--color-critical: var(--red2);
4345
--color-fill-app: var(--black1);
4446
--color-fill-side-nav: var(--black3);
4547
--color-links: var(--green5);
@@ -165,6 +167,11 @@ em code {
165167
line-height: 1.5rem;
166168
}
167169

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

0 commit comments

Comments
 (0)