Real-Time AI Code Security Auditing: Automated Vulnerability Detection and Remediation Through Meta-Experimental Analysis | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Real-Time AI Code Security Auditing: Automated Vulnerability Detection and Remediation Through Meta-Experimental Analysis Harshith Vaddiparthy This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7529613/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract This paper presents a proof-of-concept study evaluating Claude Opus 4.1's capabilities in security vulnerability generation and detection through a meta-experimental approach. We systematically generated 75 security vulnerabilities across five Python web applications (2,146 lines of code) spanning SQL injection, XSS, authentication bypass, path traversal, and command injection categories. We then evaluated the AI's ability to conduct security audits of its own generated code, producing 1,892 lines of detailed analysis. Although this circular validation approach has inherent limitations, it reveals the AI's pattern recognition capabilities and security principle understanding. The system successfully identified all intentionally created vulnerabilities and provided structured remediation guidance. This work provides initial evidence of AI potential for security code analysis and establishes a methodology for evaluating AI security comprehension, though real-world validation with independent code remains essential. Artificial Intelligence and Machine Learning AI Security Automated Auditing Vulnerability Detection Code Generation Claude AI Security Assessment DevSecOps Full Text Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-7529613","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":509849888,"identity":"9972a7eb-90b3-4448-94ca-2b52a46dc24a","order_by":0,"name":"Harshith Vaddiparthy","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAApUlEQVRIiWNgGAWjYBACA2bmYyA6gY2BB0gSp4UtDaKFjWgtDDxmYC0MIC1EAXN2nm8Pfu6py+OT7z3A8KCCCC2WzbzbDXueHS5mY+NLYEg4Q4zDDvNuk+A5cCCxjY3HgCGxjSgtPM8k/xyoI00LmzTPAWaStLCZScscOAzUkmNwgDi/nD/8TPIN0GHzm88YPvxBTIihgAOkahgFo2AUjIJRgAMAAE1vMke5k5naAAAAAElFTkSuQmCC","orcid":"https://orcid.org/0009-0005-1620-4045","institution":"Independent Researcher","correspondingAuthor":true,"prefix":"","firstName":"Harshith","middleName":"","lastName":"Vaddiparthy","suffix":""}],"badges":[],"createdAt":"2025-09-03 18:17:10","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-7529613/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-7529613/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":90580959,"identity":"fc915240-b8ad-41e5-a304-98de4481b8b3","added_by":"auto","created_at":"2025-09-04 10:15:49","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1546390,"visible":true,"origin":"","legend":"","description":"","filename":"ieeesecurityauditpaper.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7529613/v1_covered_08faf0f9-fbf9-40bd-94ed-8c6f26d07519.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003eReal-Time AI Code Security Auditing: Automated Vulnerability Detection and Remediation Through Meta-Experimental Analysis\u003c/p\u003e","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"Independent","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"AI Security, Automated Auditing, Vulnerability Detection, Code Generation, Claude AI, Security Assessment, DevSecOps","lastPublishedDoi":"10.21203/rs.3.rs-7529613/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-7529613/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eThis paper presents a proof-of-concept study evaluating Claude Opus 4.1's capabilities in security vulnerability generation and detection through a meta-experimental approach. We systematically generated 75 security vulnerabilities across five Python web applications (2,146 lines of code) spanning SQL injection, XSS, authentication bypass, path traversal, and command injection categories. We then evaluated the AI's ability to conduct security audits of its own generated code, producing 1,892 lines of detailed analysis. Although this circular validation approach has inherent limitations, it reveals the AI's pattern recognition capabilities and security principle understanding. The system successfully identified all intentionally created vulnerabilities and provided structured remediation guidance. This work provides initial evidence of AI potential for security code analysis and establishes a methodology for evaluating AI security comprehension, though real-world validation with independent code remains essential.\u003c/p\u003e","manuscriptTitle":"Real-Time AI Code Security Auditing: Automated Vulnerability Detection and Remediation Through Meta-Experimental Analysis","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-09-04 10:07:41","doi":"10.21203/rs.3.rs-7529613/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"2665c07c-1ece-4390-8dbb-1652e9ea3816","owner":[],"postedDate":"September 4th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":54154629,"name":"Artificial Intelligence and Machine Learning"}],"tags":[],"updatedAt":"2025-09-04T10:07:41+00:00","versionOfRecord":[],"versionCreatedAt":"2025-09-04 10:07:41","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-7529613","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-7529613","identity":"rs-7529613","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.