Spec-Zone.ru › Deno 2

deno approve-scripts

deno approve-scripts lets you review and approve pending npm lifecycle scripts (such as postinstall) in your dependency tree. Unlike npm, Deno does not run these scripts by default for security reasons.

Basic usage

Review and approve pending scripts interactively:

›_
deno approve-scripts

This will show you which packages have lifecycle scripts that haven't been approved yet.

Why lifecycle scripts are blocked by default

npm lifecycle scripts (such as preinstall and postinstall) run arbitrary code during the install process. This is a known supply chain attack vector — malicious packages can execute code on your machine just by being installed.

Deno takes a safer approach: lifecycle scripts must be explicitly approved before they run.

Command line usage:
deno approve-scripts [OPTIONS] [packages]...

Approve npm lifecycle scripts for installed dependencies.

Options

--lockfile-only

Install only updating the lockfile.

Last updated on December 10, 2025

© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/runtime/reference/cli/approve_scripts

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API