AI Code Security Best Practices
Security Boulevard, Wednesday, November 25th, 2026
Salt Security outlines common flaws in AI-generated code and best practices for reviewing and governing it.
In a post syndicated from Salt Security, Danielle Duhon argues that AI coding assistants generate code without knowing a company's security standards, threat model or architecture.
Cited research covers hallucinated package names that enable slopsquatting, hardcoded secrets (Claude Code co-authored commits leaked at 3.2% versus a 1.5% baseline), injection flaws, and prompt injection through rules files, with Veracode finding an OWASP Top 10 flaw in about 44% of AI coding tasks.
Recommended practices include layered SAST, DAST and manual review, approved lists of assistants and MCP servers, tagging AI-assisted commits, blocking pipeline gates and runtime monitoring.
The post closes by promoting Salt Code, which applies security policies inside coding assistants.