Sistema híbrido basado en modelos de lenguaje de gran escala y análisis estático para la detección automatizada de vulnerabilidades de seguridad en código fuente de aplicaciones web con python y node.js (javascript/typescript).
No Thumbnail Available
Files
Date
2026-07-06
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Universidad Técnica de Ambato. Facultad de Ingeniería en Sistemas Electrónica e Industrial. Carrera de Software.
Abstract
Static Application Security Testing (SAST) tools are precise but detect few vulnerabilities, whereas large language models (LLMs) widen coverage at the cost of many false positives. This research proposes, implements, and evaluates a hybrid system that combines three SAST configurations (Semgrep, Bandit, and Semgrep JSSec) with five code-specialized LLMs —two commercial (Claude Sonnet 4.6 and Opus 4.7) and three open models run locally on a 6 GB GPU (DeepSeek Coder 16B and 6.7B, Qwen 2.5 Coder 7B)— through an Intelligent Filter that routes each alert and an exploratory mode aimed at business-logic vulnerabilities. The evaluation used a stratified set of 290 Python and JavaScript/TypeScript cases (174 vulnerable and 116 clean), keeping calibration separate from reporting and assessing differences with the exact McNemar test. The best individual LLM (Sonnet 4.6, F1 = 0.643) nearly doubled the F1 of the combined SAST baseline (0.330) without losing precision, and the hybrid system improved F1 over SAST across all three complexity levels (p < 0.001) while containing the false positives of the raw LLM ensemble. The statistical Independence between both paradigms justifies their combination. In an external validation on 7 real CVEs (2024–2026), the system detected 42.9% of the cases and identified a critical SQL injection in Ghost CMS that the three SAST tools missed. Its main contribution is the traceability of every decision and the detection of semantic vulnerabilities using accessible models.
Description
Las herramientas de análisis estático de seguridad (SAST) son precisas, pero detectan pocas vulnerabilidades, mientras que los modelos de lenguaje de gran escala (LLM) amplían la cobertura a costa de muchos falsos positivos. Esta investigación propone, implementa y evalúa un sistema híbrido que combina tres configuraciones SAST (Semgrep, Bandit y Semgrep JS-Sec) con cinco LLM especializados en código —dos comerciales (Claude Sonnet 4.6 y Opus 4.7) y tres abiertos ejecutados localmente en una GPU de 6 GB (DeepSeek Coder 16B y 6.7B, Qwen 2.5 Coder 7B)— mediante un
Filtro Inteligente que enruta cada alerta y un modo exploratorio orientado a vulnerabilidades de lógica de negocio. La evaluación se realizó sobre un conjunto estratificado de 290 casos en Python y JavaScript/TypeScript (174 vulnerables y 116 limpios), separando la calibración del reporte y contrastando los resultados con el test de McNemar exacto. El mejor LLM individual (Sonnet 4.6, F1 = 0,643) casi duplicó el F1 del SAST combinado (0,330) sin perder precisión, y el sistema híbrido mejoró el F1 sobre el SAST en los tres niveles de complejidad (p < 0,001), conteniendo los falsos positivos del ensemble de LLM. La independencia estadística entre ambos paradigmas justifica su combinación. En una validación externa sobre 7 CVE reales (2024–2026) el sistema detectó el 42,9 por ciento de los casos e identificó una inyección SQL crítica en Ghost CMS que las tres herramientas SAST no vieron. Su principal aporte es la trazabilidad de cada decisión y la detección de vulnerabilidades semánticas con modelos accesibles.
Keywords
DETECCIÓN DE VULNERABILIDADES, ANÁLISIS ESTÁTICO DE SEGURIDAD, SISTEMA HÍBRIDO SAST-LLM, MODELOS DE LENGUAJE, SEGURIDAD DE APLICACIONES WEB.