Lion Cipher Lab

Detect a malicious dependency from its install scripts

Why it matters

When you run `npm install`, every dependency can run its own code on your machine - before you ever import it, before a single line of your app executes. That install-time foothold is one of the most abused paths in software supply-chain attacks, and the victims are usually developers and CI servers holding tokens and cloud credentials. Most engineers have never actually read a package's install hook or looked at what signals separate a malicious package from a noisy-but-benign one. In this lab you build a small labelled corpus, prove to yourself that an install hook really does run (it…

What you'll learn

Steps in this lab

  1. Why a dependency can own you before you ever import it
  2. Open a terminal and make a scratch folder
  3. Build a labelled corpus: seven benign packages and one benign-stub 'malicious' one
  4. Prove it: watch install-time code actually run
  5. Write the scanner: static signals, without running a thing
  6. Read the numbers, and tune by COMBINING signals
  7. The honest limit: what this scanner cannot catch, and what actually helps

Open the full interactive lab →