AI-written code needs four security gates before it merges: secrets scanning, static analysis (SAST) on the changed code, dependency scanning for new packages and a required senior review. Run all four on every pull request. Block the merge only when a finding is both high-confidence and high-severity, warn on everything else, and keep every result as release evidence.
What security gates does AI-written code need before merge?
It needs the same gates as code a person wrote, but they have to be enforced, not left optional. AI coding assistants write code that compiles and looks clean, yet Veracode's 2026 GenAI Code Security Report found that about 44% of AI code generation tasks introduced a risky vulnerability. The average security pass rate across models was 56%, almost unchanged from the first report. A later update covered in the trade press still found vulnerabilities in 38% of tasks.
The risk is not the same in every language.…