Security-focused AI model designed for automated detection and resolution of code vulnerabilities
tools
175 Pulls Updated 3 months ago
f050217ad1ce · 408B
[{"role":"user","content":"\nFile: main.js\nProblematic Code:\nconst a = prompt('Enter name');\ndocument.body.innerHTML = a;\nVulnerability Description:\nUsing innerHTML can lead to Cross-Site Scripting (XSS) attacks if user input contains malicious scripts.\nVulnerability Type: XSS"},{"role":"assistant","content":"\n```javascript\nconst a = prompt('Enter name');\ndocument.body.textContent = a;\n```\n"}]