Secure coding for web applications: Frameworks, challenges, and the role of LLMs

Kiana Kiashemshaki, Mohammad Jalili Torkamani, Negin Mahmoudi · 2025

Read Secure coding for web applications: Frameworks, challenges, and the role of LLMs by Kiana Kiashemshaki, Mohammad Jalili Torkamani, Negin Mahmoudi (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-22223.txt.

Introduction

Kiana Kiashemshaki, Mohammad Jalili Torkamani, and Negin Mahmoudi wrote this 2025 arXiv review on writing web software that resists attack. Secure coding is preached widely but practiced unevenly, blocked by organizational habits, training gaps, and technical friction. The authors survey practices across major frameworks and across web development, DevSecOps pipelines, and cloud setups.

They organize threats around the OWASP Top 10, the standard catalog of web risks, and compare frameworks in a structured way. A second thread examines large language models as security assistants: a reproducible case study tests them on four major vulnerability types, judging whether their advice and evaluations hold up. The authors close with practical guidance for developers, researchers, and teachers on weaving security into daily work rather than auditing it in afterward, a shift they argue the field badly needs.

Catalog record

CREATORKiana Kiashemshaki, Mohammad Jalili Torkamani, Negin Mahmoudi
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE44 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2507-22223

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Secure coding for web applications: Frameworks, challenges, and the role of LLMs Kiana Kiashemshaki, Mohammad Jalili Torkamani, Negin Mahmoudi Abstract Secure coding is a critical yet often overlooked practice in software development. Despite extensive awareness efforts, real-world adoption remains inconsistent due to organizational, educational, and technical barriers. This paper provides a comprehensive review of secure coding practices across major frameworks and domains, including web development, DevSecOps, and cloud security. It introduces a structured framework comparison and categorizes threats aligned with the OWASP Top 10. Additionally, we explore the rising role of Large Language Models (LLMs) in evaluating and recommending secure code, presenting a reproducible case study across four major vulnerability types. This paper offers practical insights for researchers, developers, and educators on integrating secure coding into real-world development processes. I Introduction The widespread adoption of web applications has dramatically reshaped digital service delivery across industries. From finance and e-commerce to healthcare and education, organizations increasingly rely on web based systems to streamline operations, deliver services, and engage with users. However, this growing dependency has made web applications one of the most targeted vectors for cyberattacks, exposing sensitive data and critical infrastructure to significant risk. As a result, embedding robust security mechanisms directly into the software development lifecycle has become an essential component of modern software engineering [ 2 , 6 ] . In recent years, the frequency, scale, and sophistication of web based attacks have surged. Common vulnerabilities such as SQL injection (SQLi), cross-site scripting (XSS), broken authentication, and cross-site request forgery (CSRF) continue to dominate global threat landscapes [ 9 , 12 , 14 ] . These flaws are often the result of insecure coding practices, weak input validation, and a lack of secure software design principles. Empirical studies have shown that a large percentage of data breaches can be traced back to such preventable vulnerabilities [ 14 ] . To mitigate these risks, several secure coding frameworks and best practice guidelines have been proposed. The OWASP Top 10 identifies the most critical security risks for web applications and provides actionable strategies to address them [ 6 ] . The NIST Cybersecurity Framework offers a structured, high level approach to managing cybersecurity risk through its five core functions: identify, protect, detect, respond, and recover [ 7 ] . Similarly, the Secure Software Development Lifecycle (SSDLC) emphasizes the integration of security controls at every stage of the development process, from requirements gathering to deployment and maintenance [ 2 , 4 ] . Despite the availability of such resources, the consistent implementation of secure coding practices remains a challenge in the real world. Many organizations face barriers such as inadequate developer training, pressure to meet tight deadlines, and limited security resources. This often results in a prioritization of feature delivery over security assurance, leaving applications vulnerable to exploitation [ 1 , 3 , 5 ] . Furthermore, the rapid evolution of software development paradigms—such as agile methodologies, DevOps pipelines, and cloud native environments has introduced new complexities that traditional security practices struggle to keep up with. These shifts necessitate a more adaptive, automated, and integrated approach to secure coding, aligning security measures with modern development workflows. This paper presents a comprehensive review of secure coding frameworks and practices in the context of web application security. It explores established standards, analyzes key implementation challenges, and investigates emerging trends such as AI powered security tools, zero trust architectures, and security as code in DevSecOps environments. By synthesizing insights from academic literature, industry reports, and real-world practices, the paper aims to offer practical guidance for developers, security engineers, and organizational leaders striving to enhance software security. As illustrated in Figure 1 , injection flaws and XSS vulnerabilities continue to be among the most commonly reported security issues in modern web applications. Fig. 1: Prevalence of Common Web Vulnerabilities (adapted from OWASP Top 10 and industry surveys). II LITERATURE REVIEW Secure coding has long been recognized as a critical discipline in the field of cybersecurity. Numerous studies have examined the causes of software vulnerabilities and proposed various frameworks, strategies, and methodologies to prevent them. This section presents a structured overview of the key literature, organized around core contributions: proactive security integration, vulnerability identification and mitigation, automation, and emerging security technologies. II-A Proactive Integration of Security in the Development Lifecycle Early efforts in secure software design emphasized the importance of integrating security from the initial stages of development. Shostack [ 17 ] introduced threat modeling as a proactive methodology, urging developers to assess risks during the design phase rather than waiting until deployment. His approach underscored that identifying and mitigating threats early reduces the cost and complexity of security interventions. Similarly, McGraw [ 2 ] advocated for building security into the software lifecycle by adopting risk based security assessments, secure architecture principles, and developer education. He positioned security not as an add on but as a foundational element in software design. Lipner [ 18 ] demonstrated the practical implementation of these ideas through Microsoft’s Security Development Lifecycle (SDL), showing that introducing security checkpoints throughout development can reduce vulnerabilities and enhance software reliability. II-B Vulnerability Patterns and Defensive Coding Practices A Complementary body of research focused on understanding how specific coding flaws lead to exploitation. Howard and LeBlanc [ 1 ] analyzed real-world case studies of security failures and proposed coding strategies to avoid common mistakes. They emphasized consistency in applying secure coding principles across teams and projects. Viega and McGraw [ 4 ] further highlighted typical software vulnerabilities such as poor input validation, weak error handling, and insecure authentication. They promoted defensive programming, encouraging developers to assume that any input or dependency might be malicious and to write code accordingly. Whittaker and Thompson [ 19 ] contributed by mapping attack patterns to software defects. Their work offered insight into how attackers exploit insecure code and how developers can anticipate such attacks during development. This mindset shift from reactive defense to attacker aware development laid the groundwork for more resilient applications. II-C Security Testing and Automation Another significant area of research examines tools and techniques for identifying security flaws during development and testing. Jones and Rastogi [ 20 ] compared static and dynamic analysis tools, showing that both approaches have strengths and limitations. Static analysis is valuable for early code level checks, while dynamic analysis is critical for detecting runtime vulnerabilities. The authors recommended a hybrid approach to maximize security coverage. Sharma et al. [ 21 ] expanded on this by exploring AI powered vulnerability scanners that automate threat detection. Their study found that machine learning based tools improve scanning speed and efficiency, especially in large codebases. However, they also noted the risk of false positives, reinforcing the need for expert validation. II-D Evaluating Frameworks and Emerging Technologies Rajput et al. [ 22 ] evaluated several secure coding frameworks, including OWASP and NIST, across diverse software development environments. Their findings revealed that while these frameworks offer robust guidelines, adoption is often hindered by limited expertise, resource constraints, and organizational resistance. To address security challenges in decentralized and distributed systems, Ghobadi and Tavana [ 23 ] proposed blockchain based authentication mechanisms. They argued that decentralized identity management can reduce the risks of credential theft and unauthorized access in

Read the complete text