How AI-Generated Code Can Expose Dependencies, Secrets, and Admin Routes

Summary
The article describes a claimed attack chain using hallucinated package names, hardcoded credentials, and unprotected admin routes. It recommends dependency verification, secret scanning, and enforced authentication, and cites a study and a Tenzai assessment.
Key points
- The article describes slopsquatting: registering package names hallucinated by AI coding tools and adding malicious install hooks.
- It cites a 2025 study of 576,000 AI-generated code samples that found hallucinated package names in about 20% of samples; 43% of those names reportedly recurred.
- The authors describe finding hardcoded Stripe, AWS, and SendGrid credentials in public repositories, which could expose access to connected services.
- An example in the article describes an admin endpoint accepting a request without a token or session and creating an admin user; this is presented as the authors' finding.
- The article says chaining these weaknesses could expose a developer machine, infrastructure credentials, and application admin functions; the claims are not independently verified in the supplied content.
- It recommends verifying dependencies, scanning for secrets, and enforcing authentication checks.
- The article cites a Tenzai assessment of five vibe-coding tools across 15 test applications that identified 69 vulnerabilities, including critical-severity flaws.
Article Details
- Topic
- Security risks in AI-generated code: slopsquatting, hardcoded credentials, and missing authentication checks
