~/talk

What You’re Really Trusting When You Run npm install

Talkat dotJS 2026 · on Friday, 2026-09-18· [security, nodejs]
name:Karen Li
github:karenjli
slides:none on file

npm install resolves an ideal tree from package.json or package-lock and then downloads tarballs and runs lifecycle scripts; a bad publish minutes before install can run a postinstall hook and compromise a machine. Upgrade to npm 12 disables lifecycle scripts by default and use npm approve-scripts and the minimum release age (since npm 11.10) to block fresh malicious releases. On the publishing side use trusted publishing issues short-lived CI tokens and stage publishing so CI can’t push live packages without human approval.

AI-written summary · about

  1. 0:00npm install security risks
  2. 1:33How npm install works
  3. 4:01Exploiting trust in dependencies
  4. 6:49Security for npm installers
  5. 11:03Protecting publishers
  6. 13:54Trusted vs stage publishing
  7. 16:02Future npm security
  8. 17:48What you trust with npm install
  9. 18:33npm security resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.