Secure Software Supply Chain ยท Lesson 1 of 1

Typosquatting and package checks

Study notesAbout 3 minutes. A full lesson with quick checks is on its way.

In short

Attackers publish packages with names almost like popular ones. Check the name, publisher and source before you add any dependency.

In your work

Adding a date library to a client project, you mistype the name and the install still succeeds. The package is two weeks old, from an unknown publisher, so you remove it, check your machine and report it.

What the UK rules say

  • The UK's Software Security Code of Practice expects vendors to understand what their software is made of and assess the risks of third-party components.
  • The NCSC's supply chain guidance starts with understanding the risks from the suppliers and products you depend on.

What to do

  1. Copy package names from official documentation, not memory.
  2. Check the publisher, age, downloads and linked source repository.
  3. Commit the lockfile, and review dependency changes in pull requests.
  4. Report suspicious packages, and check whether their install scripts ran.

Watch out for

  • Installing a package an AI suggested without checking it's real.
  • Running unknown install scripts on a machine signed in to client systems.

In your organisation

How does your organisation approve new dependencies, and which scans run on pull requests?

Your employer's own policies come first.

Sources

UK law and guidance, explained for learning. Not legal advice.