What is typosquatting and how do you protect developers from it?
BeginnerScenarioSupply Chain Security
Answer
Situation read → Attackers publish packages with names near popular ones (reqeusts, colourama) hoping for a typo.
What I'd do →
- Use a private registry proxy and only allow packages through it.
- Review new dependencies in PRs; require approval for new packages.
- Use SCA tools that flag new or low-reputation packages (Socket, OpenSSF Scorecard).
- Install from lockfiles only, with integrity hashes.
- Train developers to copy names from the official docs.
Why → A proxy and review step turns a silent typo into a visible event.
Interview tip → Mention install scripts as the typical payload trigger.
More on Supply Chain Security
What is an SBOM, and at which point in the pipeline do you generate it?BeginnerA customer asks for an SBOM for your product. What do you give them?BeginnerHow do you sign container images in GitHub Actions without managing private keys?IntermediateYou signed images in CI. How do you make sure the cluster only runs signed images?IntermediateLeadership wants "SLSA compliance". What do you propose?IntermediateYour internal package `acme-utils` exists in a private registry. How do you prevent dependency confusion?Advanced