Back to all lessons
Awareness Lessons
2 weeks ago

AI Coding Assistants Enable 'Slopsquatting' Supply Chain Attacks at Machine Speed

AI coding assistants can hallucinate non-existent open source package names, which attackers proactively register with malicious payloads — a technique dubbed 'slopsquatting.' Because AI generates code at machine speed, these unvetted dependencies can enter codebases far faster than traditional security reviews can catch them. This represents a novel supply chain risk where the attack surface is amplified by automation rather than human error alone. Organizations that blindly trust AI-suggested dependencies without verification are effectively outsourcing package vetting to a system that has no awareness of malicious intent. The consequences range from data exfiltration to full supply chain compromise affecting downstream users.

Tactical Insight

Immediate actions

  • Audit all AI-assisted code commits for unverified or newly introduced open source dependencies before merging.
  • Cross-reference every AI-suggested package against authoritative registries (e.g., PyPI, npm) to confirm the package exists and matches expected metadata.

Long-term improvements

  • Implement a software composition analysis (SCA) tool in CI/CD pipelines to automatically flag unknown, suspicious, or newly registered packages.
  • Establish an internal approved-package allowlist and require formal review before any new dependency is introduced into production code.
  • Train developers on slopsquatting risks and enforce policies governing acceptable use of AI coding assistants in security-sensitive workflows.

Detection measures

  • Monitor dependency manifests (e.g., package.json, requirements.txt) for unexpected changes using version-controlled diff alerts.
  • Integrate threat intelligence feeds that track newly registered or typosquatted packages in major open source registries.