Skip to main content

Install firewall: penthera install

Starter. For “is this package safe to add?”

Install firewall: penthera install

penthera deps tells you what changed after the fact. penthera install asks before anything runs:
  1. npm resolves the new tree in a temporary copy of package.json and the lockfile, with scripts off (npm install --package-lock-only --ignore-scripts).
  2. New tarballs are fetched with npm cache add. Nothing is unpacked into node_modules and no package code runs; each tarball is checked against the proposed lockfile’s integrity before it is read.
  3. The deps engine diffs capabilities against your current lockfile, lists new install scripts with their commands, and checks new names for typosquats.
  4. penthera.policy.json decides. On approval, the reviewed lockfile is installed as is, with --ignore-scripts unless you approved the scripts (on npm 12+, approved scripts are pinned in package.json allowScripts). On abort, exit code 1, and the project is byte for byte unchanged.
deny and requireApproval take capability ids from the capability table (install-scripts, shell, network, env-bulk, obfuscated, …) plus typosquat and unscanned. The requireApproval list shown is the default. allow takes names or globs, optionally pinned to a version, and overrides both. The one network use is npm talking to your configured registry, and Penthera prints which one; Penthera itself sends nothing. Workspaces and file: dependencies are not supported yet. Back to the README · All commands