[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-127444-en":3,"doc-seo-127444-105":31,"detail-sidebar-cat-0-en-105":92},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":28,"seo_description":14,"update_tm":29,"read_time":30},127444,8796095027276,"Valentina","https://avatar.qwps.com/avatar/d3BzX2FwX3Rlc3RfMjUxMTI2XzAxODA=",6,"Technology","Real-Time Code Vulnerability Detection Using a Machine Learning-Integrated Language Server","Rapid software development boosts productivity while increasing security risk when developers skip essential scans due to time pressure or limited tooling. This study proposes a real-time vulnerability detection system that integrates machine learning into a Language Server Protocol framework for inline security support. It performs line-level analysis using a Random Forest classifier over tokenized code processed via AST traversal and TF-IDF vectorization, classifying four CWE types. Trained on 20,000 labeled code lines, the model attains 82.3% accuracy and 80.7% F1-score, with average diagnostics of 72 ms for interactive workflows.","Proceedings of Engineering and Technology Innovation, vol. x, no. x, 20xx, pp. xx-xx  \nReal-Time Code Vulnerability Detection Using a Machine Learning  \nIntegrated Language Server  \nAriel Roy Luceño Reyes*, Mark David Dayanan Prado, Raffy Beting Suarez,  \nRovenado Nesta Abellana Villotes  \nCollege of Information and Computing, University of Southeastern Philippines, Davao, Philippines  \nReceived 22 April 2025; received in revised form 12 November 2025; accepted 17 November 2025  \nDOI: [https://doi.org/10.46604/peti.2025.15065](https://doi.org/10.46604/peti.2025.15065)  \nAbstract  \nThe rapid growth of software development has improved productivity but also introduced security risks, especially when developers skip essential scans due to time constraints or limited tool support. This study proposesa real-time vulnerability detection system that integrates machine learning (ML) into a language server framework to enhance software security during coding. The system uses a Language Server Protocol (LSP) architecture with a Random Forest classifier that analyzes source code at the line level. Code is pre-processed through tokenization, abstract syntax tree (AST) traversal, and TF-IDF vectorization before being classified into four vulnerability types:  \nCWE-79 (Cross-Site Scripting), CWE-89 (SQL Injection), CWE-22 (Path Traversal), and CWE-434 (Unrestricted File Upload) . Using 20,000 labeled code lines, the model achieves 82.3% accuracy and an F1-score of 80.7%, performing best on CWE-79 and CWE-89 and showing weakest performance on CWE-434 . The language server averages 72 ms per diagnostic, demonstrating its suitability for real-time developer workflows.  \nKeywords: code vulnerability detection, CWE, Language Server Protocol, machine learning  \n1. Introduction  \nThe rapid growth of software development has revolutionized operations for both enterprises and individuals, enabling them to handle daily tasks more efficiently, accelerate processes, and enhance overall productivity. However, this shift toward digital solutions has also introduced significant security risks. According to Cabrera et al. [1], security is one of the biggest concerns in the digital world. Many software applications are developed with vulnerabilities that attackers can exploit, often resulting in data breaches, financial losses, and reputational damage [2-3] . Studies reveal that most vulnerabilities emerge during the coding phase of the software development lifecycle, often made worse by developers frequently bypassing crucial security scans due to time constraints and a lack of proper tooling [4] .  \nSoftware vulnerabilities, defined as weaknesses or flaws that can be exploited to compromise a system’s confidentiality, integrity, or availability, continue to pose a significant challenge in cybersecurity [5] . Common security vulnerabilities include buffer overflows and injection-based attacks, which can impact popular software applications [6-7] . For example, an SQL Injection vulnerability in Palo Alto Networks Expedition, identified as CVE-2024-9465, allowed unauthorized access to sensitive data and system functions [8] . Similarly, CVE-2024-51378 showcased the exploitation of poorly secured endpoints, allowing attackers to bypass authentication mechanisms and execute arbitrary commands [9] .  \n* Corresponding author. E-mail address: [ariel.reyes@usep.edu.ph](ariel.reyes@usep.edu.ph)  \n2 Proceedings of Engineering and Technology Innovation, vol. x, no. x, 20xx, pp. xx-xx  \nDespite the urgency of addressing these issues, traditional vulnerability detection tools often fail to integrate seamlessly into modern development workflows. Although effective at identifying vulnerabilities before the production phase of software products, static analysis tools are typically separate from live coding environments, resulting in prolonged remediation times and inefficiencies [10] . This reflects a broader challenge where process improvements for integrating security t","cbCaipwImnGovbOw","https://ap.wps.com/l/cbCaipwImnGovbOw","pdf",3091990,3,1,15,"English","en",105,"# Abstract\n# 1. Introduction\n## Security risks in software development\n## Vulnerabilities during the coding phase\n## Motivation for ML-based and real-time detection\n# 2. Proceedings of Engineering and Technology Innovation\n## Limits of traditional static analysis tools\n## Opportunities from machine learning\n## Line-level detection and granularity\n## Real-time detection integration with an LSP","[{\"question\":\"What problem does the proposed system address?\",\"answer\":\"It addresses the security risk created when developers bypass essential vulnerability scans and when existing static analysis tools do not integrate well into live coding workflows.\"},{\"question\":\"How does the system detect vulnerabilities in real time?\",\"answer\":\"It integrates a Random Forest ML classifier into an LSP-based language server, analyzing source code at the line level after tokenization, AST traversal, and TF-IDF vectorization.\"},{\"question\":\"Which vulnerability types does the model classify and how well does it perform?\",\"answer\":\"It classifies four CWE types: CWE-79, CWE-89, CWE-22, and CWE-434. Using 20,000 labeled code lines, it achieves 82.3% accuracy and an F1-score of 80.7%, with diagnostics averaging 72 ms.\"}]","Real-Time Code Vulnerability Detection Using a Machine Learning-Integrated Language Server | PDF",1785938891,38,{"code":4,"msg":32,"data":33},"ok",{"site_id":25,"language":24,"slug":34,"title":13,"keywords":35,"description":14,"schema_data":36,"social_meta":87,"head_meta":89,"extra_data":91,"updated_unix":29},"real-time-code-vulnerability-detection-using-a-machine-learning-integrated-language-server","",{"@graph":37,"@context":86},[38,54,69],{"@type":39,"itemListElement":40},"BreadcrumbList",[41,45,49,51],{"item":42,"name":43,"@type":44,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":46,"name":47,"@type":44,"position":48},"https://docshare.wps.com/document/","Document",2,{"item":50,"name":12,"@type":44,"position":20},"https://docshare.wps.com/document/technology/",{"item":52,"name":13,"@type":44,"position":53},"https://docshare.wps.com/document/real-time-code-vulnerability-detection-using-a-machine-learning-integrated-language-server/127444/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":24,"description":14,"dateModified":62,"datePublished":63,"encodingFormat":61,"isAccessibleForFree":64,"interactionStatistic":65},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":42,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-08-26","2026-08-05",true,{"@type":66,"interactionType":67,"userInteractionCount":20},"InteractionCounter",{"@type":68},"ViewAction",{"@type":70,"mainEntity":71},"FAQPage",[72,78,82],{"name":73,"@type":74,"acceptedAnswer":75},"What problem does the proposed system address?","Question",{"text":76,"@type":77},"It addresses the security risk created when developers bypass essential vulnerability scans and when existing static analysis tools do not integrate well into live coding workflows.","Answer",{"name":79,"@type":74,"acceptedAnswer":80},"How does the system detect vulnerabilities in real time?",{"text":81,"@type":77},"It integrates a Random Forest ML classifier into an LSP-based language server, analyzing source code at the line level after tokenization, AST traversal, and TF-IDF vectorization.",{"name":83,"@type":74,"acceptedAnswer":84},"Which vulnerability types does the model classify and how well does it perform?",{"text":85,"@type":77},"It classifies four CWE types: CWE-79, CWE-89, CWE-22, and CWE-434. Using 20,000 labeled code lines, it achieves 82.3% accuracy and an F1-score of 80.7%, with diagnostics averaging 72 ms.","https://schema.org",{"og:url":52,"og:type":88,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":90,"canonical":52},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":93},[94,98,102,106,111,114,119,124,129,132,136],{"id":21,"doc_module":4,"doc_module_name":47,"category_name":95,"show_sort_weight":96,"slug":97},"Story & Novel",90,"story-novel",{"id":48,"doc_module":4,"doc_module_name":47,"category_name":99,"show_sort_weight":100,"slug":101},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":47,"category_name":103,"show_sort_weight":104,"slug":105},"Exam",70,"exam",{"id":107,"doc_module":4,"doc_module_name":47,"category_name":108,"show_sort_weight":109,"slug":110},5,"Comic",60,"comic",{"id":11,"doc_module":4,"doc_module_name":47,"category_name":12,"show_sort_weight":112,"slug":113},50,"technology",{"id":115,"doc_module":4,"doc_module_name":47,"category_name":116,"show_sort_weight":117,"slug":118},7,"Healthcare",40,"healthcare",{"id":120,"doc_module":4,"doc_module_name":47,"category_name":121,"show_sort_weight":122,"slug":123},8,"Research & Report",30,"research-report",{"id":125,"doc_module":4,"doc_module_name":47,"category_name":126,"show_sort_weight":127,"slug":128},9,"Religion & Spirituality",20,"religion-spirituality",{"id":127,"doc_module":4,"doc_module_name":47,"category_name":130,"show_sort_weight":127,"slug":131},"World Cup","world-cup",{"id":133,"doc_module":4,"doc_module_name":47,"category_name":134,"show_sort_weight":133,"slug":135},10,"Lifestyle","lifestyle",{"id":137,"doc_module":4,"doc_module_name":47,"category_name":138,"show_sort_weight":107,"slug":139},19,"General","general"]