From 8a06b44cf923e07e03e60e4d8a312114a7460cc7 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 9 Feb 2022 15:11:43 -0800 Subject: [PATCH] doc: emphasize security warning in vm module doc Refs: https://github.com/nodejs/node/issues/40718 --- doc/api/vm.md | 6 ++++-- doc/api_assets/style.css | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/api/vm.md b/doc/api/vm.md index 6e7e60152c9b11..023f3ffdbdc2c1 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -9,8 +9,10 @@ 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. + +The `vm` module is not a security +mechanism. Do not use it to run untrusted code. JavaScript code can be compiled and run immediately or compiled, saved, and run later. diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index 90db2f4bd8a66b..695111400152f0 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -29,6 +29,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 +41,7 @@ .dark-mode { --background-color-highlight: var(--black2); + --color-critical: var(--red2); --color-fill-app: var(--black1); --color-fill-side-nav: var(--black3); --color-links: var(--green5); @@ -165,6 +167,11 @@ em code { line-height: 1.5rem; } +.critical, .critical code { + color: var(--critical); + font-weight: 700; +} + li.version-picker { position: relative; }