Install scripts and provenance

Lesson 19 of 27 · Dependencies and the safety net · 2 min Get the course to watch

Installing a package is not just copying files. In the npm world, a package can declare scripts that run on your machine as part of the install, before you have imported a single line. So the moment you install, you are already running someone else's code.

The rest of this lesson

  • Scripts run by default
  • The trade off
  • What provenance tells you
  • What it does not tell you
  • Your own build is a dependency too
  • Judgement not ritual
  • What to keep

The full lesson is animated and narrated, with a short quiz, and you can pause it to ask a question. It comes with Secure the code AI writes.