Work

Detección de Vulnerabilidades en Código Fuente Mediante Inteligencia Artificial: Enfoque Híbrido con CodeBERT, Regex y Automatización

Year: 2026
Type: article
Abstract: Objetive: present a hybrid approach for the automated detection of vulnerabilities in source code, which integrates semantic analysis using CodeBERT with the identification of specific patterns via regular expressions (Regex). Methodology: In this study, we demonstrated, proposed and implemented a hybrid approach that combined the CodeBERT semantic model with detection using explanatory rules (Regex) within an automated architecture integrating GitHub, FastAPI, SQLite and n8n, to process source code, detect vulnerabilities and record the results in a traceable manner. Results: In experimental tests, the hybrid model achieved an accuracy of 0.90, a recall of 1.00 and an F1-score of 0.94, outperforming the CodeBERT model, which achieved an accuracy of 0.50 and an F1-score of 0.67. The best performance was also observed for PHP (88.89 per cent) and Python (77.78 per cent), whilst lower results were found for C++ and Go due to their greater structural complexity and their limited representation in the training data. Conclusions: The hybrid approach is an effective alternative for the automated analysis of vulnerabilities in source code and provides a foundation for future work focused on continuous integration, adaptive learning, and validation in real software repositories.
Language: English
Open Access status: hybrid
OpenAlex ID: W7225615333
FWCI:
Cites:
Cited by:
Related to: