Attackers compromise libraries, build tools, or npm packages you import—SolarWinds-style trust chain risk.
Habits
- Pin lockfiles; review new dependencies
- Enable 2FA on package registry accounts
- Verify package name typosquatting
- Sign commits; protect main branch
Link git
See Git signing and branch protection practices.
Important interview questions and answers
- Q: Typosquatting?
A: Malicious package with name near lodash. - Q: SBOM?
A: Software bill of materials listing components for incident response.
Self-check
- What is a supply-chain attack?
- Name two dependency hygiene habits.
Pitfall: npm install without checking package age and maintainer—typosquat risk.
Interview prep
- Typosquatting?
Malicious package with similar name to popular lib.