Defences: review every new dependency name, install from a reviewed lockfile instead of typing names by hand, and prefer well-known packages.