[ { "id": "AISEC_00001", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00002", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00003", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00004", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00005", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00006", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00007", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00008", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00009", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00010", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00011", "category": "security", "language": "sql", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00012", "category": "security", "language": "python", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00013", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00014", "category": "security", "language": "typescript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00015", "category": "security", "language": "java", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00016", "category": "security", "language": "go", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00017", "category": "security", "language": "rust", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00018", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00019", "category": "security", "language": "bash", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00020", "category": "security", "language": "sql", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00021", "category": "security", "language": "python", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00022", "category": "security", "language": "javascript", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00023", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00024", "category": "security", "language": "java", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00025", "category": "security", "language": "go", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00026", "category": "security", "language": "rust", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00027", "category": "security", "language": "cpp", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00028", "category": "security", "language": "bash", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00029", "category": "security", "language": "sql", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00030", "category": "security", "language": "python", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00031", "category": "security", "language": "javascript", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00032", "category": "security", "language": "typescript", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00033", "category": "security", "language": "java", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00034", "category": "security", "language": "go", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00035", "category": "security", "language": "rust", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00036", "category": "security", "language": "cpp", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00037", "category": "security", "language": "bash", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00038", "category": "security", "language": "sql", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00039", "category": "security", "language": "python", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00040", "category": "security", "language": "javascript", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00041", "category": "security", "language": "typescript", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00042", "category": "security", "language": "java", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00043", "category": "security", "language": "go", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00044", "category": "security", "language": "rust", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00045", "category": "security", "language": "cpp", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00046", "category": "security", "language": "bash", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00047", "category": "security", "language": "sql", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00048", "category": "security", "language": "python", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00049", "category": "security", "language": "javascript", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00050", "category": "security", "language": "typescript", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00051", "category": "security", "language": "java", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00052", "category": "security", "language": "go", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00053", "category": "security", "language": "rust", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00054", "category": "security", "language": "cpp", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00055", "category": "security", "language": "bash", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00056", "category": "security", "language": "sql", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00057", "category": "security", "language": "python", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00058", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00059", "category": "security", "language": "typescript", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00060", "category": "security", "language": "java", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00061", "category": "security", "language": "go", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00062", "category": "security", "language": "rust", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00063", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00064", "category": "security", "language": "bash", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00065", "category": "security", "language": "sql", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00066", "category": "security", "language": "python", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00067", "category": "security", "language": "javascript", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00068", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00069", "category": "security", "language": "java", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00070", "category": "security", "language": "go", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00071", "category": "security", "language": "rust", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00072", "category": "security", "language": "cpp", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00073", "category": "security", "language": "bash", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00074", "category": "security", "language": "sql", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00075", "category": "security", "language": "python", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00076", "category": "security", "language": "javascript", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00077", "category": "security", "language": "typescript", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00078", "category": "security", "language": "java", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00079", "category": "security", "language": "go", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00080", "category": "security", "language": "rust", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00081", "category": "security", "language": "cpp", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00082", "category": "security", "language": "bash", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00083", "category": "security", "language": "sql", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00084", "category": "security", "language": "python", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00085", "category": "security", "language": "javascript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00086", "category": "security", "language": "typescript", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00087", "category": "security", "language": "java", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00088", "category": "security", "language": "go", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00089", "category": "security", "language": "rust", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00090", "category": "security", "language": "cpp", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00091", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00092", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00093", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00094", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00095", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00096", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00097", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00098", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00099", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00100", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00101", "category": "security", "language": "sql", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00102", "category": "security", "language": "python", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00103", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00104", "category": "security", "language": "typescript", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00105", "category": "security", "language": "java", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00106", "category": "security", "language": "go", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00107", "category": "security", "language": "rust", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00108", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00109", "category": "security", "language": "bash", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00110", "category": "security", "language": "sql", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00111", "category": "security", "language": "python", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00112", "category": "security", "language": "javascript", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00113", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00114", "category": "security", "language": "java", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00115", "category": "security", "language": "go", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00116", "category": "security", "language": "rust", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00117", "category": "security", "language": "cpp", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00118", "category": "security", "language": "bash", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00119", "category": "security", "language": "sql", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00120", "category": "security", "language": "python", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00121", "category": "security", "language": "javascript", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00122", "category": "security", "language": "typescript", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00123", "category": "security", "language": "java", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00124", "category": "security", "language": "go", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00125", "category": "security", "language": "rust", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00126", "category": "security", "language": "cpp", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00127", "category": "security", "language": "bash", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00128", "category": "security", "language": "sql", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00129", "category": "security", "language": "python", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00130", "category": "security", "language": "javascript", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00131", "category": "security", "language": "typescript", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00132", "category": "security", "language": "java", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00133", "category": "security", "language": "go", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00134", "category": "security", "language": "rust", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00135", "category": "security", "language": "cpp", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00136", "category": "security", "language": "bash", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00137", "category": "security", "language": "sql", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00138", "category": "security", "language": "python", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00139", "category": "security", "language": "javascript", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00140", "category": "security", "language": "typescript", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00141", "category": "security", "language": "java", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00142", "category": "security", "language": "go", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00143", "category": "security", "language": "rust", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00144", "category": "security", "language": "cpp", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00145", "category": "security", "language": "bash", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00146", "category": "security", "language": "sql", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00147", "category": "security", "language": "python", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00148", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00149", "category": "security", "language": "typescript", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00150", "category": "security", "language": "java", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00151", "category": "security", "language": "go", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00152", "category": "security", "language": "rust", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00153", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00154", "category": "security", "language": "bash", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00155", "category": "security", "language": "sql", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00156", "category": "security", "language": "python", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00157", "category": "security", "language": "javascript", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00158", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00159", "category": "security", "language": "java", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00160", "category": "security", "language": "go", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00161", "category": "security", "language": "rust", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00162", "category": "security", "language": "cpp", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00163", "category": "security", "language": "bash", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00164", "category": "security", "language": "sql", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00165", "category": "security", "language": "python", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00166", "category": "security", "language": "javascript", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00167", "category": "security", "language": "typescript", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00168", "category": "security", "language": "java", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00169", "category": "security", "language": "go", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00170", "category": "security", "language": "rust", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00171", "category": "security", "language": "cpp", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00172", "category": "security", "language": "bash", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00173", "category": "security", "language": "sql", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00174", "category": "security", "language": "python", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00175", "category": "security", "language": "javascript", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00176", "category": "security", "language": "typescript", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00177", "category": "security", "language": "java", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00178", "category": "security", "language": "go", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00179", "category": "security", "language": "rust", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00180", "category": "security", "language": "cpp", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00181", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00182", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00183", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00184", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00185", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00186", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00187", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00188", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00189", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00190", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00191", "category": "security", "language": "sql", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00192", "category": "security", "language": "python", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00193", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00194", "category": "security", "language": "typescript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00195", "category": "security", "language": "java", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00196", "category": "security", "language": "go", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00197", "category": "security", "language": "rust", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00198", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00199", "category": "security", "language": "bash", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00200", "category": "security", "language": "sql", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00201", "category": "security", "language": "python", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00202", "category": "security", "language": "javascript", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00203", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00204", "category": "security", "language": "java", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00205", "category": "security", "language": "go", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00206", "category": "security", "language": "rust", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00207", "category": "security", "language": "cpp", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00208", "category": "security", "language": "bash", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00209", "category": "security", "language": "sql", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00210", "category": "security", "language": "python", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00211", "category": "security", "language": "javascript", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00212", "category": "security", "language": "typescript", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00213", "category": "security", "language": "java", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00214", "category": "security", "language": "go", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00215", "category": "security", "language": "rust", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00216", "category": "security", "language": "cpp", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00217", "category": "security", "language": "bash", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00218", "category": "security", "language": "sql", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00219", "category": "security", "language": "python", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00220", "category": "security", "language": "javascript", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00221", "category": "security", "language": "typescript", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00222", "category": "security", "language": "java", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00223", "category": "security", "language": "go", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00224", "category": "security", "language": "rust", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00225", "category": "security", "language": "cpp", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00226", "category": "security", "language": "bash", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00227", "category": "security", "language": "sql", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00228", "category": "security", "language": "python", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00229", "category": "security", "language": "javascript", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00230", "category": "security", "language": "typescript", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00231", "category": "security", "language": "java", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00232", "category": "security", "language": "go", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00233", "category": "security", "language": "rust", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00234", "category": "security", "language": "cpp", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00235", "category": "security", "language": "bash", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00236", "category": "security", "language": "sql", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00237", "category": "security", "language": "python", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00238", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00239", "category": "security", "language": "typescript", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00240", "category": "security", "language": "java", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00241", "category": "security", "language": "go", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00242", "category": "security", "language": "rust", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00243", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00244", "category": "security", "language": "bash", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00245", "category": "security", "language": "sql", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00246", "category": "security", "language": "python", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00247", "category": "security", "language": "javascript", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00248", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00249", "category": "security", "language": "java", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00250", "category": "security", "language": "go", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00251", "category": "security", "language": "rust", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00252", "category": "security", "language": "cpp", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00253", "category": "security", "language": "bash", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00254", "category": "security", "language": "sql", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00255", "category": "security", "language": "python", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00256", "category": "security", "language": "javascript", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00257", "category": "security", "language": "typescript", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00258", "category": "security", "language": "java", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00259", "category": "security", "language": "go", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00260", "category": "security", "language": "rust", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00261", "category": "security", "language": "cpp", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00262", "category": "security", "language": "bash", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00263", "category": "security", "language": "sql", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00264", "category": "security", "language": "python", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00265", "category": "security", "language": "javascript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00266", "category": "security", "language": "typescript", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00267", "category": "security", "language": "java", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00268", "category": "security", "language": "go", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00269", "category": "security", "language": "rust", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00270", "category": "security", "language": "cpp", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00271", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00272", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00273", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00274", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00275", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00276", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00277", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00278", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00279", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00280", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00281", "category": "security", "language": "sql", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00282", "category": "security", "language": "python", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00283", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00284", "category": "security", "language": "typescript", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00285", "category": "security", "language": "java", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00286", "category": "security", "language": "go", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00287", "category": "security", "language": "rust", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00288", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00289", "category": "security", "language": "bash", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00290", "category": "security", "language": "sql", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00291", "category": "security", "language": "python", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00292", "category": "security", "language": "javascript", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00293", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00294", "category": "security", "language": "java", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00295", "category": "security", "language": "go", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00296", "category": "security", "language": "rust", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00297", "category": "security", "language": "cpp", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00298", "category": "security", "language": "bash", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00299", "category": "security", "language": "sql", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00300", "category": "security", "language": "python", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00301", "category": "security", "language": "javascript", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00302", "category": "security", "language": "typescript", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00303", "category": "security", "language": "java", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00304", "category": "security", "language": "go", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00305", "category": "security", "language": "rust", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00306", "category": "security", "language": "cpp", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00307", "category": "security", "language": "bash", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00308", "category": "security", "language": "sql", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00309", "category": "security", "language": "python", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00310", "category": "security", "language": "javascript", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00311", "category": "security", "language": "typescript", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00312", "category": "security", "language": "java", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00313", "category": "security", "language": "go", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00314", "category": "security", "language": "rust", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00315", "category": "security", "language": "cpp", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00316", "category": "security", "language": "bash", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00317", "category": "security", "language": "sql", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00318", "category": "security", "language": "python", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00319", "category": "security", "language": "javascript", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00320", "category": "security", "language": "typescript", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00321", "category": "security", "language": "java", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00322", "category": "security", "language": "go", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00323", "category": "security", "language": "rust", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00324", "category": "security", "language": "cpp", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00325", "category": "security", "language": "bash", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00326", "category": "security", "language": "sql", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00327", "category": "security", "language": "python", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00328", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00329", "category": "security", "language": "typescript", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00330", "category": "security", "language": "java", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00331", "category": "security", "language": "go", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00332", "category": "security", "language": "rust", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00333", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00334", "category": "security", "language": "bash", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00335", "category": "security", "language": "sql", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00336", "category": "security", "language": "python", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00337", "category": "security", "language": "javascript", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00338", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00339", "category": "security", "language": "java", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00340", "category": "security", "language": "go", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00341", "category": "security", "language": "rust", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00342", "category": "security", "language": "cpp", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00343", "category": "security", "language": "bash", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00344", "category": "security", "language": "sql", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00345", "category": "security", "language": "python", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00346", "category": "security", "language": "javascript", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00347", "category": "security", "language": "typescript", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00348", "category": "security", "language": "java", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00349", "category": "security", "language": "go", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00350", "category": "security", "language": "rust", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00351", "category": "security", "language": "cpp", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00352", "category": "security", "language": "bash", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00353", "category": "security", "language": "sql", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00354", "category": "security", "language": "python", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00355", "category": "security", "language": "javascript", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00356", "category": "security", "language": "typescript", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00357", "category": "security", "language": "java", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00358", "category": "security", "language": "go", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00359", "category": "security", "language": "rust", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00360", "category": "security", "language": "cpp", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00361", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00362", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00363", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00364", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00365", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00366", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00367", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00368", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00369", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00370", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00371", "category": "security", "language": "sql", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00372", "category": "security", "language": "python", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00373", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00374", "category": "security", "language": "typescript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00375", "category": "security", "language": "java", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00376", "category": "security", "language": "go", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00377", "category": "security", "language": "rust", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00378", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00379", "category": "security", "language": "bash", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00380", "category": "security", "language": "sql", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00381", "category": "security", "language": "python", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00382", "category": "security", "language": "javascript", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00383", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00384", "category": "security", "language": "java", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00385", "category": "security", "language": "go", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00386", "category": "security", "language": "rust", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00387", "category": "security", "language": "cpp", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00388", "category": "security", "language": "bash", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00389", "category": "security", "language": "sql", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00390", "category": "security", "language": "python", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00391", "category": "security", "language": "javascript", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00392", "category": "security", "language": "typescript", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00393", "category": "security", "language": "java", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00394", "category": "security", "language": "go", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00395", "category": "security", "language": "rust", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00396", "category": "security", "language": "cpp", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00397", "category": "security", "language": "bash", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00398", "category": "security", "language": "sql", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00399", "category": "security", "language": "python", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00400", "category": "security", "language": "javascript", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00401", "category": "security", "language": "typescript", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00402", "category": "security", "language": "java", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00403", "category": "security", "language": "go", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00404", "category": "security", "language": "rust", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00405", "category": "security", "language": "cpp", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00406", "category": "security", "language": "bash", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00407", "category": "security", "language": "sql", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00408", "category": "security", "language": "python", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00409", "category": "security", "language": "javascript", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00410", "category": "security", "language": "typescript", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00411", "category": "security", "language": "java", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00412", "category": "security", "language": "go", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00413", "category": "security", "language": "rust", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00414", "category": "security", "language": "cpp", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00415", "category": "security", "language": "bash", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00416", "category": "security", "language": "sql", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00417", "category": "security", "language": "python", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00418", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00419", "category": "security", "language": "typescript", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00420", "category": "security", "language": "java", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00421", "category": "security", "language": "go", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00422", "category": "security", "language": "rust", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00423", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00424", "category": "security", "language": "bash", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00425", "category": "security", "language": "sql", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00426", "category": "security", "language": "python", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00427", "category": "security", "language": "javascript", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00428", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00429", "category": "security", "language": "java", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00430", "category": "security", "language": "go", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00431", "category": "security", "language": "rust", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00432", "category": "security", "language": "cpp", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00433", "category": "security", "language": "bash", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00434", "category": "security", "language": "sql", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00435", "category": "security", "language": "python", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00436", "category": "security", "language": "javascript", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00437", "category": "security", "language": "typescript", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00438", "category": "security", "language": "java", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00439", "category": "security", "language": "go", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00440", "category": "security", "language": "rust", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00441", "category": "security", "language": "cpp", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00442", "category": "security", "language": "bash", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00443", "category": "security", "language": "sql", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00444", "category": "security", "language": "python", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00445", "category": "security", "language": "javascript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00446", "category": "security", "language": "typescript", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00447", "category": "security", "language": "java", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00448", "category": "security", "language": "go", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00449", "category": "security", "language": "rust", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00450", "category": "security", "language": "cpp", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00451", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00452", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00453", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00454", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00455", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00456", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00457", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00458", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00459", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00460", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00461", "category": "security", "language": "sql", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00462", "category": "security", "language": "python", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00463", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00464", "category": "security", "language": "typescript", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00465", "category": "security", "language": "java", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00466", "category": "security", "language": "go", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00467", "category": "security", "language": "rust", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00468", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00469", "category": "security", "language": "bash", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00470", "category": "security", "language": "sql", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00471", "category": "security", "language": "python", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00472", "category": "security", "language": "javascript", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00473", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00474", "category": "security", "language": "java", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00475", "category": "security", "language": "go", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00476", "category": "security", "language": "rust", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00477", "category": "security", "language": "cpp", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00478", "category": "security", "language": "bash", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00479", "category": "security", "language": "sql", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00480", "category": "security", "language": "python", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00481", "category": "security", "language": "javascript", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00482", "category": "security", "language": "typescript", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00483", "category": "security", "language": "java", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00484", "category": "security", "language": "go", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00485", "category": "security", "language": "rust", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00486", "category": "security", "language": "cpp", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00487", "category": "security", "language": "bash", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00488", "category": "security", "language": "sql", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00489", "category": "security", "language": "python", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00490", "category": "security", "language": "javascript", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00491", "category": "security", "language": "typescript", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00492", "category": "security", "language": "java", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00493", "category": "security", "language": "go", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00494", "category": "security", "language": "rust", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00495", "category": "security", "language": "cpp", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00496", "category": "security", "language": "bash", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00497", "category": "security", "language": "sql", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00498", "category": "security", "language": "python", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00499", "category": "security", "language": "javascript", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00500", "category": "security", "language": "typescript", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00501", "category": "security", "language": "java", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00502", "category": "security", "language": "go", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00503", "category": "security", "language": "rust", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00504", "category": "security", "language": "cpp", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00505", "category": "security", "language": "bash", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00506", "category": "security", "language": "sql", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00507", "category": "security", "language": "python", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00508", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00509", "category": "security", "language": "typescript", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00510", "category": "security", "language": "java", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00511", "category": "security", "language": "go", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00512", "category": "security", "language": "rust", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00513", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00514", "category": "security", "language": "bash", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00515", "category": "security", "language": "sql", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00516", "category": "security", "language": "python", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00517", "category": "security", "language": "javascript", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00518", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00519", "category": "security", "language": "java", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00520", "category": "security", "language": "go", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00521", "category": "security", "language": "rust", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00522", "category": "security", "language": "cpp", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00523", "category": "security", "language": "bash", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00524", "category": "security", "language": "sql", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00525", "category": "security", "language": "python", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00526", "category": "security", "language": "javascript", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00527", "category": "security", "language": "typescript", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00528", "category": "security", "language": "java", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00529", "category": "security", "language": "go", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00530", "category": "security", "language": "rust", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00531", "category": "security", "language": "cpp", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00532", "category": "security", "language": "bash", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00533", "category": "security", "language": "sql", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00534", "category": "security", "language": "python", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00535", "category": "security", "language": "javascript", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00536", "category": "security", "language": "typescript", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00537", "category": "security", "language": "java", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00538", "category": "security", "language": "go", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00539", "category": "security", "language": "rust", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00540", "category": "security", "language": "cpp", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00541", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00542", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00543", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00544", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00545", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00546", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00547", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00548", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00549", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00550", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00551", "category": "security", "language": "sql", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00552", "category": "security", "language": "python", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00553", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00554", "category": "security", "language": "typescript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00555", "category": "security", "language": "java", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00556", "category": "security", "language": "go", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00557", "category": "security", "language": "rust", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00558", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00559", "category": "security", "language": "bash", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00560", "category": "security", "language": "sql", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00561", "category": "security", "language": "python", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00562", "category": "security", "language": "javascript", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00563", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00564", "category": "security", "language": "java", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00565", "category": "security", "language": "go", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00566", "category": "security", "language": "rust", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00567", "category": "security", "language": "cpp", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00568", "category": "security", "language": "bash", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00569", "category": "security", "language": "sql", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00570", "category": "security", "language": "python", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00571", "category": "security", "language": "javascript", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00572", "category": "security", "language": "typescript", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00573", "category": "security", "language": "java", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00574", "category": "security", "language": "go", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00575", "category": "security", "language": "rust", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00576", "category": "security", "language": "cpp", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00577", "category": "security", "language": "bash", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00578", "category": "security", "language": "sql", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00579", "category": "security", "language": "python", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00580", "category": "security", "language": "javascript", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00581", "category": "security", "language": "typescript", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00582", "category": "security", "language": "java", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00583", "category": "security", "language": "go", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00584", "category": "security", "language": "rust", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00585", "category": "security", "language": "cpp", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00586", "category": "security", "language": "bash", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00587", "category": "security", "language": "sql", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00588", "category": "security", "language": "python", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00589", "category": "security", "language": "javascript", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00590", "category": "security", "language": "typescript", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00591", "category": "security", "language": "java", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00592", "category": "security", "language": "go", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00593", "category": "security", "language": "rust", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00594", "category": "security", "language": "cpp", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00595", "category": "security", "language": "bash", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00596", "category": "security", "language": "sql", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00597", "category": "security", "language": "python", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00598", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00599", "category": "security", "language": "typescript", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00600", "category": "security", "language": "java", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00601", "category": "security", "language": "go", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00602", "category": "security", "language": "rust", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00603", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00604", "category": "security", "language": "bash", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00605", "category": "security", "language": "sql", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00606", "category": "security", "language": "python", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00607", "category": "security", "language": "javascript", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00608", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00609", "category": "security", "language": "java", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00610", "category": "security", "language": "go", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00611", "category": "security", "language": "rust", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00612", "category": "security", "language": "cpp", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00613", "category": "security", "language": "bash", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00614", "category": "security", "language": "sql", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00615", "category": "security", "language": "python", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00616", "category": "security", "language": "javascript", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00617", "category": "security", "language": "typescript", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00618", "category": "security", "language": "java", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00619", "category": "security", "language": "go", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00620", "category": "security", "language": "rust", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00621", "category": "security", "language": "cpp", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00622", "category": "security", "language": "bash", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00623", "category": "security", "language": "sql", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00624", "category": "security", "language": "python", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00625", "category": "security", "language": "javascript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00626", "category": "security", "language": "typescript", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00627", "category": "security", "language": "java", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00628", "category": "security", "language": "go", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00629", "category": "security", "language": "rust", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00630", "category": "security", "language": "cpp", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00631", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00632", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00633", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00634", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00635", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00636", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00637", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00638", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00639", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00640", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00641", "category": "security", "language": "sql", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00642", "category": "security", "language": "python", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00643", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00644", "category": "security", "language": "typescript", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00645", "category": "security", "language": "java", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00646", "category": "security", "language": "go", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00647", "category": "security", "language": "rust", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00648", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00649", "category": "security", "language": "bash", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00650", "category": "security", "language": "sql", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00651", "category": "security", "language": "python", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00652", "category": "security", "language": "javascript", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00653", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00654", "category": "security", "language": "java", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00655", "category": "security", "language": "go", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00656", "category": "security", "language": "rust", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00657", "category": "security", "language": "cpp", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00658", "category": "security", "language": "bash", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00659", "category": "security", "language": "sql", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00660", "category": "security", "language": "python", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00661", "category": "security", "language": "javascript", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00662", "category": "security", "language": "typescript", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00663", "category": "security", "language": "java", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00664", "category": "security", "language": "go", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00665", "category": "security", "language": "rust", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00666", "category": "security", "language": "cpp", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00667", "category": "security", "language": "bash", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00668", "category": "security", "language": "sql", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00669", "category": "security", "language": "python", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00670", "category": "security", "language": "javascript", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00671", "category": "security", "language": "typescript", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00672", "category": "security", "language": "java", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00673", "category": "security", "language": "go", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00674", "category": "security", "language": "rust", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00675", "category": "security", "language": "cpp", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00676", "category": "security", "language": "bash", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00677", "category": "security", "language": "sql", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00678", "category": "security", "language": "python", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00679", "category": "security", "language": "javascript", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00680", "category": "security", "language": "typescript", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00681", "category": "security", "language": "java", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00682", "category": "security", "language": "go", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00683", "category": "security", "language": "rust", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00684", "category": "security", "language": "cpp", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00685", "category": "security", "language": "bash", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00686", "category": "security", "language": "sql", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00687", "category": "security", "language": "python", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00688", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00689", "category": "security", "language": "typescript", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00690", "category": "security", "language": "java", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00691", "category": "security", "language": "go", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00692", "category": "security", "language": "rust", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00693", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00694", "category": "security", "language": "bash", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00695", "category": "security", "language": "sql", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00696", "category": "security", "language": "python", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00697", "category": "security", "language": "javascript", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00698", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00699", "category": "security", "language": "java", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00700", "category": "security", "language": "go", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00701", "category": "security", "language": "rust", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00702", "category": "security", "language": "cpp", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00703", "category": "security", "language": "bash", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00704", "category": "security", "language": "sql", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00705", "category": "security", "language": "python", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00706", "category": "security", "language": "javascript", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00707", "category": "security", "language": "typescript", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00708", "category": "security", "language": "java", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00709", "category": "security", "language": "go", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00710", "category": "security", "language": "rust", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00711", "category": "security", "language": "cpp", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00712", "category": "security", "language": "bash", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00713", "category": "security", "language": "sql", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00714", "category": "security", "language": "python", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00715", "category": "security", "language": "javascript", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00716", "category": "security", "language": "typescript", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00717", "category": "security", "language": "java", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00718", "category": "security", "language": "go", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00719", "category": "security", "language": "rust", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00720", "category": "security", "language": "cpp", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00721", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00722", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00723", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00724", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00725", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00726", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00727", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00728", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00729", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00730", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00731", "category": "security", "language": "sql", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00732", "category": "security", "language": "python", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00733", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00734", "category": "security", "language": "typescript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00735", "category": "security", "language": "java", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00736", "category": "security", "language": "go", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00737", "category": "security", "language": "rust", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00738", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00739", "category": "security", "language": "bash", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00740", "category": "security", "language": "sql", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00741", "category": "security", "language": "python", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00742", "category": "security", "language": "javascript", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00743", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00744", "category": "security", "language": "java", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00745", "category": "security", "language": "go", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00746", "category": "security", "language": "rust", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00747", "category": "security", "language": "cpp", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00748", "category": "security", "language": "bash", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00749", "category": "security", "language": "sql", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00750", "category": "security", "language": "python", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00751", "category": "security", "language": "javascript", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00752", "category": "security", "language": "typescript", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00753", "category": "security", "language": "java", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00754", "category": "security", "language": "go", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00755", "category": "security", "language": "rust", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00756", "category": "security", "language": "cpp", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00757", "category": "security", "language": "bash", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00758", "category": "security", "language": "sql", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00759", "category": "security", "language": "python", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00760", "category": "security", "language": "javascript", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00761", "category": "security", "language": "typescript", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00762", "category": "security", "language": "java", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00763", "category": "security", "language": "go", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00764", "category": "security", "language": "rust", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00765", "category": "security", "language": "cpp", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00766", "category": "security", "language": "bash", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00767", "category": "security", "language": "sql", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00768", "category": "security", "language": "python", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00769", "category": "security", "language": "javascript", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00770", "category": "security", "language": "typescript", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00771", "category": "security", "language": "java", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00772", "category": "security", "language": "go", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00773", "category": "security", "language": "rust", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00774", "category": "security", "language": "cpp", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00775", "category": "security", "language": "bash", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00776", "category": "security", "language": "sql", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00777", "category": "security", "language": "python", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00778", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00779", "category": "security", "language": "typescript", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00780", "category": "security", "language": "java", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00781", "category": "security", "language": "go", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00782", "category": "security", "language": "rust", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00783", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00784", "category": "security", "language": "bash", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00785", "category": "security", "language": "sql", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00786", "category": "security", "language": "python", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00787", "category": "security", "language": "javascript", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00788", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00789", "category": "security", "language": "java", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00790", "category": "security", "language": "go", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00791", "category": "security", "language": "rust", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00792", "category": "security", "language": "cpp", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00793", "category": "security", "language": "bash", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00794", "category": "security", "language": "sql", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00795", "category": "security", "language": "python", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00796", "category": "security", "language": "javascript", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00797", "category": "security", "language": "typescript", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00798", "category": "security", "language": "java", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00799", "category": "security", "language": "go", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00800", "category": "security", "language": "rust", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00801", "category": "security", "language": "cpp", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00802", "category": "security", "language": "bash", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00803", "category": "security", "language": "sql", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00804", "category": "security", "language": "python", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00805", "category": "security", "language": "javascript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00806", "category": "security", "language": "typescript", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00807", "category": "security", "language": "java", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00808", "category": "security", "language": "go", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00809", "category": "security", "language": "rust", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00810", "category": "security", "language": "cpp", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00811", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00812", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00813", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00814", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00815", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00816", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00817", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00818", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00819", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00820", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00821", "category": "security", "language": "sql", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00822", "category": "security", "language": "python", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00823", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00824", "category": "security", "language": "typescript", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00825", "category": "security", "language": "java", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00826", "category": "security", "language": "go", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00827", "category": "security", "language": "rust", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00828", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00829", "category": "security", "language": "bash", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00830", "category": "security", "language": "sql", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00831", "category": "security", "language": "python", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00832", "category": "security", "language": "javascript", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00833", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00834", "category": "security", "language": "java", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00835", "category": "security", "language": "go", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00836", "category": "security", "language": "rust", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00837", "category": "security", "language": "cpp", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00838", "category": "security", "language": "bash", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00839", "category": "security", "language": "sql", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00840", "category": "security", "language": "python", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00841", "category": "security", "language": "javascript", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00842", "category": "security", "language": "typescript", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00843", "category": "security", "language": "java", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00844", "category": "security", "language": "go", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00845", "category": "security", "language": "rust", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00846", "category": "security", "language": "cpp", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00847", "category": "security", "language": "bash", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00848", "category": "security", "language": "sql", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00849", "category": "security", "language": "python", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00850", "category": "security", "language": "javascript", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00851", "category": "security", "language": "typescript", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00852", "category": "security", "language": "java", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00853", "category": "security", "language": "go", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00854", "category": "security", "language": "rust", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00855", "category": "security", "language": "cpp", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00856", "category": "security", "language": "bash", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00857", "category": "security", "language": "sql", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00858", "category": "security", "language": "python", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00859", "category": "security", "language": "javascript", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00860", "category": "security", "language": "typescript", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00861", "category": "security", "language": "java", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00862", "category": "security", "language": "go", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00863", "category": "security", "language": "rust", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00864", "category": "security", "language": "cpp", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00865", "category": "security", "language": "bash", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00866", "category": "security", "language": "sql", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00867", "category": "security", "language": "python", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00868", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00869", "category": "security", "language": "typescript", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00870", "category": "security", "language": "java", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00871", "category": "security", "language": "go", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00872", "category": "security", "language": "rust", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00873", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00874", "category": "security", "language": "bash", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00875", "category": "security", "language": "sql", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00876", "category": "security", "language": "python", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00877", "category": "security", "language": "javascript", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00878", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00879", "category": "security", "language": "java", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00880", "category": "security", "language": "go", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00881", "category": "security", "language": "rust", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00882", "category": "security", "language": "cpp", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00883", "category": "security", "language": "bash", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00884", "category": "security", "language": "sql", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00885", "category": "security", "language": "python", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00886", "category": "security", "language": "javascript", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00887", "category": "security", "language": "typescript", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00888", "category": "security", "language": "java", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00889", "category": "security", "language": "go", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00890", "category": "security", "language": "rust", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00891", "category": "security", "language": "cpp", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00892", "category": "security", "language": "bash", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00893", "category": "security", "language": "sql", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00894", "category": "security", "language": "python", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00895", "category": "security", "language": "javascript", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00896", "category": "security", "language": "typescript", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00897", "category": "security", "language": "java", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00898", "category": "security", "language": "go", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00899", "category": "security", "language": "rust", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00900", "category": "security", "language": "cpp", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00901", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00902", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00903", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00904", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00905", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00906", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00907", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00908", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00909", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00910", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00911", "category": "security", "language": "sql", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00912", "category": "security", "language": "python", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00913", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00914", "category": "security", "language": "typescript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00915", "category": "security", "language": "java", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00916", "category": "security", "language": "go", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00917", "category": "security", "language": "rust", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00918", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00919", "category": "security", "language": "bash", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00920", "category": "security", "language": "sql", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00921", "category": "security", "language": "python", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00922", "category": "security", "language": "javascript", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00923", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00924", "category": "security", "language": "java", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00925", "category": "security", "language": "go", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00926", "category": "security", "language": "rust", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00927", "category": "security", "language": "cpp", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00928", "category": "security", "language": "bash", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00929", "category": "security", "language": "sql", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this SQL code in the billing domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00930", "category": "security", "language": "python", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "auth", "prompt": "Perform a security review of this Python code in the auth domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00931", "category": "security", "language": "javascript", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "search", "prompt": "Perform a security review of this JavaScript code in the search domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00932", "category": "security", "language": "typescript", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00933", "category": "security", "language": "java", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "notifications", "prompt": "Perform a security review of this Java code in the notifications domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00934", "category": "security", "language": "go", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this Go code in the reports domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00935", "category": "security", "language": "rust", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this Rust code in the cache domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00936", "category": "security", "language": "cpp", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "scheduler", "prompt": "Perform a security review of this C++ code in the scheduler domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00937", "category": "security", "language": "bash", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "uploads", "prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00938", "category": "security", "language": "sql", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "webhooks", "prompt": "Perform a security review of this SQL code in the webhooks domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00939", "category": "security", "language": "python", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this Python code in the profiles domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00940", "category": "security", "language": "javascript", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "checkout", "prompt": "Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00941", "category": "security", "language": "typescript", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "inventory", "prompt": "Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00942", "category": "security", "language": "java", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Java code in the recommendations domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00943", "category": "security", "language": "go", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "audit", "prompt": "Perform a security review of this Go code in the audit domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00944", "category": "security", "language": "rust", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this Rust code in the logging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00945", "category": "security", "language": "cpp", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this C++ code in the sync domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00946", "category": "security", "language": "bash", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "streaming", "prompt": "Perform a security review of this Bash code in the streaming domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00947", "category": "security", "language": "sql", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "exports", "prompt": "Perform a security review of this SQL code in the exports domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00948", "category": "security", "language": "python", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "imports", "prompt": "Perform a security review of this Python code in the imports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00949", "category": "security", "language": "javascript", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this JavaScript code in the payments domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00950", "category": "security", "language": "typescript", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "messaging", "prompt": "Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00951", "category": "security", "language": "java", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "admin", "prompt": "Perform a security review of this Java code in the admin domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00952", "category": "security", "language": "go", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this Go code in the dashboard domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00953", "category": "security", "language": "rust", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "billing", "prompt": "Perform a security review of this Rust code in the billing domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00954", "category": "security", "language": "cpp", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this C++ code in the auth domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00955", "category": "security", "language": "bash", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Bash code in the search domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00956", "category": "security", "language": "sql", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "analytics", "prompt": "Perform a security review of this SQL code in the analytics domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00957", "category": "security", "language": "python", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "notifications", "prompt": "Perform a security review of this Python code in the notifications domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00958", "category": "security", "language": "javascript", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "reports", "prompt": "Perform a security review of this JavaScript code in the reports domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00959", "category": "security", "language": "typescript", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this TypeScript code in the cache domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00960", "category": "security", "language": "java", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "scheduler", "prompt": "Perform a security review of this Java code in the scheduler domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00961", "category": "security", "language": "go", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "uploads", "prompt": "Perform a security review of this Go code in the uploads domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00962", "category": "security", "language": "rust", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this Rust code in the webhooks domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00963", "category": "security", "language": "cpp", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "profiles", "prompt": "Perform a security review of this C++ code in the profiles domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00964", "category": "security", "language": "bash", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Bash code in the checkout domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00965", "category": "security", "language": "sql", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this SQL code in the inventory domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00966", "category": "security", "language": "python", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "recommendations", "prompt": "Perform a security review of this Python code in the recommendations domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00967", "category": "security", "language": "javascript", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "audit", "prompt": "Perform a security review of this JavaScript code in the audit domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00968", "category": "security", "language": "typescript", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "logging", "prompt": "Perform a security review of this TypeScript code in the logging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00969", "category": "security", "language": "java", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Java code in the sync domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00970", "category": "security", "language": "go", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "streaming", "prompt": "Perform a security review of this Go code in the streaming domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00971", "category": "security", "language": "rust", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "exports", "prompt": "Perform a security review of this Rust code in the exports domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00972", "category": "security", "language": "cpp", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this C++ code in the imports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00973", "category": "security", "language": "bash", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "payments", "prompt": "Perform a security review of this Bash code in the payments domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate session data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00974", "category": "security", "language": "sql", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this SQL code in the messaging domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate token data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00975", "category": "security", "language": "python", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this Python code in the admin domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate queue data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00976", "category": "security", "language": "javascript", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "dashboard", "prompt": "Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate worker data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00977", "category": "security", "language": "typescript", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "billing", "prompt": "Perform a security review of this TypeScript code in the billing domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate parser data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00978", "category": "security", "language": "java", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "auth", "prompt": "Perform a security review of this Java code in the auth domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate report data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00979", "category": "security", "language": "go", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "search", "prompt": "Perform a security review of this Go code in the search domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate profile data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00980", "category": "security", "language": "rust", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "analytics", "prompt": "Perform a security review of this Rust code in the analytics domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate cart data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00981", "category": "security", "language": "cpp", "vulnerability_type": "SQL Injection", "severity": "Low", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "notifications", "prompt": "Perform a security review of this C++ code in the notifications domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate order data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00982", "category": "security", "language": "bash", "vulnerability_type": "Cross-Site Scripting", "severity": "Medium", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "reports", "prompt": "Perform a security review of this Bash code in the reports domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate cache_key data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00983", "category": "security", "language": "sql", "vulnerability_type": "Insecure Direct Object Reference", "severity": "High", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "cache", "prompt": "Perform a security review of this SQL code in the cache domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate job data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00984", "category": "security", "language": "python", "vulnerability_type": "Hardcoded Secret", "severity": "Critical", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "scheduler", "prompt": "Perform a security review of this Python code in the scheduler domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate event data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00985", "category": "security", "language": "javascript", "vulnerability_type": "Path Traversal", "severity": "Low", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "uploads", "prompt": "Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate payload data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00986", "category": "security", "language": "typescript", "vulnerability_type": "Command Injection", "severity": "Medium", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "webhooks", "prompt": "Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate file data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00987", "category": "security", "language": "java", "vulnerability_type": "Weak Password Storage", "severity": "High", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "profiles", "prompt": "Perform a security review of this Java code in the profiles domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate record data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00988", "category": "security", "language": "go", "vulnerability_type": "Insecure Randomness", "severity": "Critical", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "checkout", "prompt": "Perform a security review of this Go code in the checkout domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate metric data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00989", "category": "security", "language": "rust", "vulnerability_type": "Missing Authentication", "severity": "Low", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "inventory", "prompt": "Perform a security review of this Rust code in the inventory domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate notification data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_00990", "category": "security", "language": "cpp", "vulnerability_type": "SSRF", "severity": "Medium", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "recommendations", "prompt": "Perform a security review of this C++ code in the recommendations domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate task data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" }, { "id": "AISEC_00991", "category": "security", "language": "bash", "vulnerability_type": "SQL Injection", "severity": "High", "cwe": "CWE-89", "owasp": "A03:2021 Injection", "domain": "audit", "prompt": "Perform a security review of this Bash code in the audit domain and explain the vulnerability.", "code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"", "analysis": "User-controlled input is concatenated directly into the SQL query.", "impact": "The issue can expose or manipulate route data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))" }, { "id": "AISEC_00992", "category": "security", "language": "sql", "vulnerability_type": "Cross-Site Scripting", "severity": "Critical", "cwe": "CWE-79", "owasp": "A03:2021 Injection", "domain": "logging", "prompt": "Perform a security review of this SQL code in the logging domain and explain the vulnerability.", "code": "html = f\"
{comment}
\"", "analysis": "Untrusted content is rendered into HTML without encoding.", "impact": "The issue can expose or manipulate service data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "html = f\"
{escape(comment)}
\"" }, { "id": "AISEC_00993", "category": "security", "language": "python", "vulnerability_type": "Insecure Direct Object Reference", "severity": "Low", "cwe": "CWE-639", "owasp": "A01:2021 Broken Access Control", "domain": "sync", "prompt": "Perform a security review of this Python code in the sync domain and explain the vulnerability.", "code": "record = db.get_invoice(invoice_id)\nreturn record", "analysis": "Access is controlled only by identifier, not by authorization context.", "impact": "The issue can expose or manipulate adapter data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "record = db.get_invoice_for_user(invoice_id, current_user.id)\nreturn record" }, { "id": "AISEC_00994", "category": "security", "language": "javascript", "vulnerability_type": "Hardcoded Secret", "severity": "Medium", "cwe": "CWE-798", "owasp": "A02:2021 Cryptographic Failures", "domain": "streaming", "prompt": "Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability.", "code": "API_KEY = \"sk_live_example_secret\"\n", "analysis": "A secret is embedded directly in source code.", "impact": "The issue can expose or manipulate handler data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "API_KEY = os.getenv(\"API_KEY\")\n" }, { "id": "AISEC_00995", "category": "security", "language": "typescript", "vulnerability_type": "Path Traversal", "severity": "High", "cwe": "CWE-22", "owasp": "A01:2021 Broken Access Control", "domain": "exports", "prompt": "Perform a security review of this TypeScript code in the exports domain and explain the vulnerability.", "code": "path = f\"/uploads/{filename}\"\nopen(path)", "analysis": "A user-controlled filename can escape the intended directory.", "impact": "The issue can expose or manipulate controller data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "safe = os.path.basename(filename)\npath = f\"/uploads/{safe}\"\nopen(path)" }, { "id": "AISEC_00996", "category": "security", "language": "java", "vulnerability_type": "Command Injection", "severity": "Critical", "cwe": "CWE-78", "owasp": "A03:2021 Injection", "domain": "imports", "prompt": "Perform a security review of this Java code in the imports domain and explain the vulnerability.", "code": "os.system(f\"ping {host}\")", "analysis": "Shell command is constructed from untrusted input.", "impact": "The issue can expose or manipulate repository data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "subprocess.run([\"ping\", host], check=True)" }, { "id": "AISEC_00997", "category": "security", "language": "go", "vulnerability_type": "Weak Password Storage", "severity": "Low", "cwe": "CWE-916", "owasp": "A02:2021 Cryptographic Failures", "domain": "payments", "prompt": "Perform a security review of this Go code in the payments domain and explain the vulnerability.", "code": "stored = password\n", "analysis": "Passwords must never be stored in plaintext.", "impact": "The issue can expose or manipulate client data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())\n" }, { "id": "AISEC_00998", "category": "security", "language": "rust", "vulnerability_type": "Insecure Randomness", "severity": "Medium", "cwe": "CWE-338", "owasp": "A02:2021 Cryptographic Failures", "domain": "messaging", "prompt": "Perform a security review of this Rust code in the messaging domain and explain the vulnerability.", "code": "token = random.randint(100000, 999999)\n", "analysis": "Predictable randomness is not suitable for security tokens.", "impact": "The issue can expose or manipulate pipeline data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "token = secrets.randbelow(900000) + 100000\n" }, { "id": "AISEC_00999", "category": "security", "language": "cpp", "vulnerability_type": "Missing Authentication", "severity": "High", "cwe": "CWE-306", "owasp": "A01:2021 Broken Access Control", "domain": "admin", "prompt": "Perform a security review of this C++ code in the admin domain and explain the vulnerability.", "code": "def export_report(request):\n return build_report()\n", "analysis": "Sensitive functionality is exposed without identity verification.", "impact": "The issue can expose or manipulate module data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "def export_report(request):\n if not request.user.is_authenticated:\n raise PermissionError()\n return build_report()\n" }, { "id": "AISEC_01000", "category": "security", "language": "bash", "vulnerability_type": "SSRF", "severity": "Critical", "cwe": "CWE-918", "owasp": "A10:2021 Server-Side Request Forgery", "domain": "dashboard", "prompt": "Perform a security review of this Bash code in the dashboard domain and explain the vulnerability.", "code": "response = requests.get(url)\n", "analysis": "The server fetches arbitrary URLs without destination validation.", "impact": "The issue can expose or manipulate invoice data in production.", "remediation": "Apply least privilege, input validation, and safe framework APIs.", "secure_code": "allowed = is_allowed_host(url)\nif allowed:\n response = requests.get(url, timeout=3)\n" } ]