Security depends on the work around the code as well as the code itself.
A 2023 ACM study gave 47 participants five security-related programming tasks in Python, JavaScript, and C. The group using an assistant based on Codex-davinci-002 wrote less secure code on those tasks and was more likely to believe its code was secure. The study provides evidence about one early assistant and a small controlled setting; it cannot predict the result for every developer or today’s tools.
A separate USENIX Security study asked 58 students to implement one linked-list “shopping list” in C. In that specific task, the rate of critical security bugs in the AI-assisted group was no more than 10% higher than in the control group. The difference between these studies is a reason to inspect task design and language before repeating either result as a universal rule.
In a 2025 ACL benchmark, researchers tested 20 proprietary and open models on code completion, vulnerability detection and classification, and repair. They reported that models often identified vulnerable code, yet still generated insecure code and struggled with some vulnerability types and fixes. Security review, secure generation, and repair should therefore be evaluated as separate capabilities.
Two ACL 2026 studies move the question closer to real projects. SecureVibeBench ↗ tests multi-file changes across 105 C/C++ tasks from 41 OSS-Fuzz projects, with both static and dynamic checks. The best-performing agent setup produced a solution that was both correct and secure for 23.8% of that benchmark’s tasks. That is a result for targeted C/C++ security scenarios, not a failure rate for coding tools in general.
RealSec-bench ↗ uses 105 expert-validated cases from high-risk Java repositories. In its experiments, retrieval improved functional correctness but did little for security; broad security instructions could also cause compilation failures without reliably preventing vulnerabilities. A stronger prompt can help specify intent, but it cannot replace testing the resulting security property.
For another view of the workflow around code changes, see the review checklist before merging ↗ and the evidence on code maintainability ↗.