Abstract
We develop an iterative self-verification pipeline in which LLMs generate code, analyze potential vulnerabilities, revise the code, and re-verify in cycles. This “chain-of-verification” approach improves vulnerability detection by 51% and secure-code accuracy by 38% over single-pass generation. Tested on 1,200 prompts involving web, crypto, and system programming tasks, the method excels in catching missing checks and unsafe fallbacks. This demonstrates that structured self-review can transform LLMs into more reliable secure-code generators.
References
Omotunde, H., & Ahmed, M. (2023). A comprehensive review of security measures in database systems: Assessing authentication, access control, and beyond. Mesopotamian Journal of CyberSecurity, 2023, 115-133.
Li, T., Jiang, Y., Hong, E., & Liu, S. (2025). Organizational Development in High-Growth Biopharmaceutical Companies: A Data-Driven Approach to Talent Pipeline and Competency Modeling.
Thakur, S., Ahmad, B., Pearce, H., Tan, B., Dolan-Gavitt, B., Karri, R., & Garg, S. (2024). Verigen: A large language model for verilog code generation. ACM Transactions on Design Automation of Electronic Systems, 29(3), 1-31.
Gu, X., Tian, X., Yang, J., & Liu, M. (2025). Building and Performance Validation of a Digital Twin Regulatory Framework for Financial Compliance and Market Transparency. Available at SSRN 5839782.
Martius, F., Jansen, L., Struck, L., Arumugam, A., Geierhaas, L., Ortloff, A. M., ... & Tiefenau, C. (2025, April). Out of Sight, Out of Mind? Exploring Data Protection Practices for Personal Data in Usable Security & Privacy Studies. In Proceedings of the 2025 CHI Conference on Human Factors in Computing Systems (pp. 1-16).
Qin, F., Cheng, H. Y., Sneeringer, R., Vlachostergiou, M., Acharya, S., Liu, H., ... & Yao, L. (2021, May). ExoForm: Shape memory and self-fusing semi-rigid wearables. In Extended Abstracts of the 2021 CHI Conference on Human Factors in Computing Systems (pp. 1-8).
Tihanyi, N., Bisztray, T., Ferrag, M. A., Cherif, B., Dubniczky, R. A., Jain, R., & Cordeiro, L. C. (2026). Vulnerability detection: from formal verification to large language models and hybrid approaches: a comprehensive overview. Adversarial Example Detection and Mitigation Using Machine Learning, 33-47.
Fleischer, M., Das, D., Bose, P., Bai, W., Lu, K., Payer, M., ... & Vigna, G. (2023). {ACTOR}:{Action-Guided} Kernel Fuzzing. In 32nd USENIX Security Symposium (USENIX Security 23) (pp. 5003-5020).
Abu-Huliqah, E. N., Al Gaphari, G. H., & Ghurab, M. (2024, November). A survey on graph-based methods for Software Vulnerability Detection. In 2024 1st International Conference on Emerging Technologies for Dependable Internet of Things (ICETI) (pp. 1-11). IEEE.
Tan, L., Liu, D., Liu, X., Wu, W., & Jiang, H. (2025). Efficient Grey Wolf Optimization: A High-Performance Optimizer with Reduced Memory Usage and Accelerated Convergence.
Johnson, J. M., & Khoshgoftaar, T. M. (2022). A survey on classifying big data with label noise. ACM Journal of Data and Information Quality, 14(4), 1-43.
Bai, W., & Wu, Q. (2023). Towards more effective responsible disclosure for vulnerability research. Proc. of EthiCS.
Martinez, M., Martínez-Fernández, S., & Franch, X. (2025). The Sustainability Face of Automated Program Repair Tools. ACM Transactions on Software Engineering and Methodology.
Nian, J., Yang, M., Gao, X., Liu, H., Fang, F., Cheng, L., & Wu, X. (2025). RPFF-PA: Reliable and Parallel Fault-tolerant Framework for Path Latency Reduction Deployed in Register Arrays. ACM Transactions on Embedded Computing Systems.
Wrzesińska, M. A., Rakoczy, J., Binder-Olibrowska, K. W., Kostyła, M., Allott, V. E., Harris, S. R., ... & Harris, B. H. (2025). Comparing structured note-taking and multiple-choice question writing as learning strategies among physiotherapy students. BMC Medical Education, 25(1), 1665.
Sheu, J. B., & Gao, X. Q. (2014). Alliance or no alliance—Bargaining power in competing reverse supply chains. European Journal of Operational Research, 233(2), 313-325.
Tehranipoor, M., Zamiri Azar, K., Asadizanjani, N., Rahman, F., Mardani Kamali, H., & Farahmandi, F. (2024). Large Language Models for SoC Security. In Hardware Security: A Look into the Future (pp. 255-299). Cham: Springer Nature Switzerland.
Du, Y. (2025). Research on Deep Learning Models for Forecasting Cross-Border Trade Demand Driven by Multi-Source Time-Series Data. Journal of Science, Innovation & Social Impact, 1(2), 63-70.
Saha, D., Yahyaei, K., Saha, S. K., Tehranipoor, M., & Farahmandi, F. (2024, May). Empowering hardware security with llm: The development of a vulnerable hardware database. In 2024 IEEE International Symposium on Hardware Oriented Security and Trust (HOST) (pp. 233-243). IEEE.
Mao, Y., Ma, X., & Li, J. (2025). Research on API Security Gateway and Data Access Control Model for Multi-Tenant Full-Stack Systems.
Dubniczky, R. A., Horvát, K. Z., Bisztray, T., Ferrag, M. A., Cordeiro, L. C., & Tihanyi, N. (2025, July). Castle: Benchmarking dataset for static code analyzers and llms towards cwe detection. In International Symposium on Theoretical Aspects of Software Engineering (pp. 253-272). Cham: Springer Nature Switzerland.
Mao, Y., Ma, X., & Li, J. (2025). Research on Web System Anomaly Detection and Intelligent Operations Based on Log Modeling and Self-Supervised Learning.
Vijayaraghavan, G., Jayachandran, P., Murthy, A., Govindan, S., & Subramanian, V. (2026). If You Want Coherence, Orchestrate a Team of Rivals: Multi-Agent Models of Organizational Intelligence. arXiv preprint arXiv:2601.14351.
Liu, S., Feng, H., & Liu, X. (2025). A Study on the Mechanism of Generative Design Tools' Impact on Visual Language Reconstruction: An Interactive Analysis of Semantic Mapping and User Cognition. Authorea Preprints.

This work is licensed under a Creative Commons Attribution 4.0 International License.
Copyright (c) 2026 Laura Fernández, Javier Morales, María Castillo (Author)