Security

What is dependency hell and how do you avoid it?

Dependency hell: how one npm, pip or NuGet install pulls in hundreds of hidden packages, how supply chain attacks exploit them, and how to cut the risk.

  • 6 min read
  • 5 questions
  • +35 XP
Transcript

Dependency Hell explained by cats. Kitty wants to make a website. One page. Simple. She could write it in HTML and CSS. But she searches online. The internet says: Run this command. She runs it. Her tiny project fills with code written by hundreds of other kitties.

Helpers for everything. adding numbers. Checking if number is odd. Things Kitty could write herself. Each helper depends on more helpers. A long chain Kitty never sees. Then A deep helper turns malicious. Like the recent supply chain attack on npm.

Thousands of apps break. Including Kitty’s one-page site. Package managers like npm, nuget, and pip are powerful, but they pull in everything. One command. Hundreds of dependencies. Hundreds of risks. This is Dependency Hell. So Kitty stays alert. She runs automatic scans, catches problems early so the tuna stays protected.