Q110 [Scenario]: A security scan flags a malicious package dependency in a Node.js project. The developer admits accepting an unverified npm import path suggested by Copilot. What attack vector occurred?

This is a Slopsquatting (Package Hallucination) attack. Malicious actors register package names that generative AI models commonly hallucinate, waiting for developers to blindly execute npm install on suggested code.

Key Takeaways
  • Always verify generated import statements against trusted package registries.

  • Integrate Dependabot or security linters to flag non-existent or malicious imports.

Knowledge Check

What security risk involves malicious packages uploaded to registries matching common AI-hallucinated names?