Skip to content
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

doc: emphasize security warning in vm module doc #41916

Merged
merged 1 commit into from Feb 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions doc/api/vm.md
Expand Up @@ -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.
Expand Down
7 changes: 7 additions & 0 deletions doc/api_assets/style.css
Expand Up @@ -11,6 +11,7 @@
--red1: #d60027;
--red2: #d50027;
--red3: #ca5010;
--red4: #ff7070;
--green1: #3e7a38;
--green2: #5a8147;
--green3: #64de64;
Expand All @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -165,6 +168,10 @@ em code {
line-height: 1.5rem;
}

.critical, .critical code {
color: var(--color-critical);
}

li.version-picker {
position: relative;
}
Expand Down