Security and Reliability of AI-Generated C++ Code: A Static Analysis Study Aligned With Saudi NCA Essential Cybersecurity Controls (ECC)
IEEE Access · 2026 · 14 · 50310-50328
DOI: 10.1109/access.2026.3679355 ↗Kurz gefasst
Fachartikel in der Zeitschrift IEEE Access, 2026. Verfasst von Mohammed Alabdullatif. Die Arbeit nennt 35 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Deanship of Scientific Research, Vice Presidency for Graduate Studies and Scientific Research, King Faisal University, Saudi Arabia.
Abstract (Originalsprache)
AI-powered tools based on large language models are increasingly used to generate source code. While this can improve productivity, it raises important questions about the security and reliability of the generated programs, especially in languages such as C++ that are widely used in safety-critical domains, including automotive, aerospace, industrial control, and medical systems. This study evaluates the security and reliability of AI-generated C++ code using static analysis tools. C++ programs were generated across multiple tasks grouped by Vision 2030-inspired domains, with repeated generations per task, and analysed using Cppcheck and Clang-Tidy. The results show clear differences across models in both the volume and types of findings, including recurring security-relevant weaknesses and diagnostics related to correctness and configuration. To support a security-focused interpretation, applicable findings were mapped to the Common Weakness Enumeration (CWE) taxonomy and linked to Saudi Arabia’s National Cybersecurity Authority Essential Cybersecurity Controls (NCA ECC). In addition, an automated repair phase based on targeted prompting was applied, and before–after analysis was conducted to examine changes in reported findings. The results indicate that the repair process reduced several types of diagnostics for most evaluated models, although some residual and newly introduced issues remained. Overall, the findings highlight the importance of applying automated analysis, security-oriented interpretation, and repair-oriented prompting when using AI-generated C++ code, particularly in regulated or security-sensitive environments.
Förderung
- Deanship of Scientific Research, Vice Presidency for Graduate Studies and Scientific Research, King Faisal University, Saudi Arabia
Zitieren
APA
Alabdullatif, M. (2026). Security and Reliability of AI-Generated C++ Code: A Static Analysis Study Aligned With Saudi NCA Essential Cybersecurity Controls (ECC). IEEE Access, 14, 50310-50328. https://doi.org/10.1109/access.2026.3679355
Vancouver
Alabdullatif M. Security and Reliability of AI-Generated C++ Code: A Static Analysis Study Aligned With Saudi NCA Essential Cybersecurity Controls (ECC). IEEE Access. 2026;14:50310-50328. doi:10.1109/access.2026.3679355
BibTeX
@article{Alabdullatif2026,
author = {Alabdullatif, Mohammed},
title = {Security and Reliability of AI-Generated C++ Code: A Static Analysis Study Aligned With Saudi NCA Essential Cybersecurity Controls (ECC)},
journal = {IEEE Access},
year = {2026},
volume = {14},
pages = {50310--50328},
doi = {10.1109/access.2026.3679355}
}
EUVIMED