The code you did not read
A modern application declares a few dozen dependencies and installs hundreds, because each one brings its own. Every package is maintained by someone with publish rights, and any of those accounts can be phished, sold, or abandoned and picked up by someone else.
Malicious releases have reached production through hijacked maintainer accounts, look-alike package names, and install scripts that run with a developer's full access the moment the package is downloaded.
Why review does not catch it
Code review covers the lines your team changed. A dependency update changes thousands of lines nobody on the team wrote, summarized as one line in a lock file. Automated update tools make it routine to merge them.
What reduces the risk
Fewer dependencies is the control that works best, because each one removed is a maintainer you no longer have to trust. Beyond that:
- Pin exact versions with integrity hashes and commit the lock file.
- Disable install-time scripts by default.
- Delay adoption of brand-new releases unless they fix something you need.
- Build in an environment with no access to production secrets.
- Keep an inventory, so when a package is reported compromised you can answer "are we affected" in minutes.
Related: Penetration testing & audits →Fractional CTO services →