Cybersecurity glossary
Dependency confusion
Dependency confusion is a supply chain attack where a public package is given the same name as a private internal one, so the build installs the attacker's version.
If a package manager looks in both a private and a public index and prefers the higher version, a public package with a high version number wins. Typosquatting is its cousin: a package named one letter away from a popular one.
The fixes are to pin each package to one index, reserve your internal names, and use lock files with hashes so the build installs exactly what was reviewed.
Learn it hands-on
These free lessons teach it with commands to run in a lab of your own and checked tasks. Read them whole with no account.