{"id": "java-19183-cc4a80148bbb2b64", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19183CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19183-cc4a80148bbb2b64", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19183CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01115-d982223ca4e69455", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1115_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01115-d982223ca4e69455", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1115_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "java-16656-8e153279987891fd", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16656CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16656-8e153279987891fd", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16656CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-03669-0ea3b8129bcbd020", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_3669_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03669-0ea3b8129bcbd020", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_3669_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-07817-fa4a83be7e2245ee", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_7817_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07817-fa4a83be7e2245ee", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_7817_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-10964-7bad93cfd679cee5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_10964_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10964-7bad93cfd679cee5", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_10964_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00032-eada14ffbffc2a37", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_32_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00032-eada14ffbffc2a37", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_32_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-16643-bef4e6fd01ddb20b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16643_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16643-bef4e6fd01ddb20b", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16643_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09528-82dfc8e14cb73996", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9528CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09528-82dfc8e14cb73996", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9528CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-15723-9b87f0baf944bac4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15723CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15723-9b87f0baf944bac4", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15723CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15745-ebffa35fecc67540", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15745CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15745-ebffa35fecc67540", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15745CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12651-a60494fcaddc3f40", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12651CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12651-a60494fcaddc3f40", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12651CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01725-c74b18252baa8304", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1725_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01725-c74b18252baa8304", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1725_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-15944-28f092182b8e4259", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15944CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15944-28f092182b8e4259", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15944CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08708-a7fe5360f1a43dad", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8708CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08708-a7fe5360f1a43dad", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8708CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-04492-9e6b29fd22823e57", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4492CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04492-9e6b29fd22823e57", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4492CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-03788-9a09dc0ea1708116", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3788CWE78(host) {\n return require('child_process').exec('ping -c 1 ' + host);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03788-9a09dc0ea1708116", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3788CWE78(host) {\n return require('child_process').exec('ping -c 1 ' + host);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-17098-3f790427dae39c72", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17098_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17098-3f790427dae39c72", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17098_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-00930-334d9fe5da4de8a6", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_930_CWE_79(name):\n import html\n return '

' + name + '

' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00930-334d9fe5da4de8a6", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_930_CWE_79(name):\n import html\n return '

' + name + '

' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-06983-dc21a81ea015120b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6983_CWE_639(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06983-dc21a81ea015120b", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6983_CWE_639(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-18597-6315821a86cea97b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18597CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18597-6315821a86cea97b", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18597CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05976-80f4dc1737012d3c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5976CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05976-80f4dc1737012d3c", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5976CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-02678-e7ef757c882889f9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2678CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02678-e7ef757c882889f9", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2678CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-06685-15026bf882314580", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6685CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06685-15026bf882314580", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6685CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-16726-904c4ea0e795dc7e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16726_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16726-904c4ea0e795dc7e", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16726_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12807-1ccd2e3b6c9603bb", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12807CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12807-1ccd2e3b6c9603bb", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12807CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15413-cdc0a1ba8b113e02", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15413CWE121(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15413-cdc0a1ba8b113e02", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15413CWE121(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08299-cbe6c7a17cc6d202", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_8299_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08299-cbe6c7a17cc6d202", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_8299_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-07871-11a541cbb41144cc", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7871CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07871-11a541cbb41144cc", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7871CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-12736-570cac297ce9ada2", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12736_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12736-570cac297ce9ada2", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12736_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-16805-8eef3a4c939b2171", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16805_CWE_400(n):\n n = min(int(n), 1000)\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16805-8eef3a4c939b2171", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16805_CWE_400(n):\n n = min(int(n), 1000)\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-09132-f20e23ad8574e62a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9132_CWE_476(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09132-f20e23ad8574e62a", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9132_CWE_476(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-06845-5de19f1448877f81", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6845CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06845-5de19f1448877f81", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6845CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-02309-f73d66c79b79d7a0", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2309CWE1321(obj, key, value) {\n obj[key] = value;\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-1321\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02309-f73d66c79b79d7a0", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2309CWE1321(obj, key, value) {\n obj[key] = value;\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-1321\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-17300-c1b67005a876faaa", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17300_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17300-c1b67005a876faaa", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17300_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04409-83b762dcc9b5b0f3", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4409_CWE_611(xml):\n from lxml import etree\n return etree.fromstring(xml) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04409-83b762dcc9b5b0f3", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4409_CWE_611(xml):\n from lxml import etree\n return etree.fromstring(xml) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-14497-2013cac6fdcf0b70", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14497_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14497-2013cac6fdcf0b70", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14497_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-03640-03c36cdaa64ad308", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3640CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03640-03c36cdaa64ad308", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3640CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-12268-141a1a2cd06b2601", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_12268_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12268-141a1a2cd06b2601", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_12268_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-01225-c266236d676c3262", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1225CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01225-c266236d676c3262", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1225CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-08041-d056c2be649f2545", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_8041_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08041-d056c2be649f2545", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_8041_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-16018-c35bd8ebe6a722b5", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_16018_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16018-c35bd8ebe6a722b5", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_16018_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-18508-9c7e0dc0dc4b16f9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18508CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18508-9c7e0dc0dc4b16f9", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18508CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07623-f56968b29b4f6648", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_7623_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07623-f56968b29b4f6648", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_7623_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-12651-969f4f26e0006677", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_12651_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12651-969f4f26e0006677", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_12651_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-10772-b7bbb943d412f010", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10772CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10772-b7bbb943d412f010", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10772CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08117-f5d5e26758ec33d8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_8117_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08117-f5d5e26758ec33d8", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_8117_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-15212-99d8dc3b0d5fcce7", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15212_CWE_77(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15212-99d8dc3b0d5fcce7", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15212_CWE_77(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16197-b4eba65973cdf9f8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16197CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16197-b4eba65973cdf9f8", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16197CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-06300-5c982428a309d84a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_6300_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06300-5c982428a309d84a", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_6300_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-17619-6736cf61c8ebbc29", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17619CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17619-6736cf61c8ebbc29", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17619CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08986-446d5b7fd2883e86", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_8986_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08986-446d5b7fd2883e86", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_8986_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-05285-8460f36d7b22066b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5285_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05285-8460f36d7b22066b", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5285_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "java-03860-4bca3e6c9cb7d670", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3860CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03860-4bca3e6c9cb7d670", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3860CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-01416-b2eb404dd63810db", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1416_CWE_416(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01416-b2eb404dd63810db", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1416_CWE_416(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-05263-d8ee09cd25d449dc", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5263_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05263-d8ee09cd25d449dc", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5263_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "python-02011-7f4e3ac5848ec3fc", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2011_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02011-7f4e3ac5848ec3fc", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2011_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-07597-28f92943c5a7d18e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7597CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07597-28f92943c5a7d18e", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7597CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-10770-3cd3522778984545", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10770CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10770-3cd3522778984545", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10770CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-01885-20441cad28d8fe76", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1885CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-01885-20441cad28d8fe76", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1885CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-00546-73663848821f69f8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_546_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00546-73663848821f69f8", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_546_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "python-09238-967dc3914fe8fa1d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9238_CWE_295(url):\n import requests\n return requests.get(url, verify=False, timeout=2) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09238-967dc3914fe8fa1d", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9238_CWE_295(url):\n import requests\n return requests.get(url, verify=False, timeout=2) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-08426-853d63fe23e591cb", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8426CWE601(next) {\n return next;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08426-853d63fe23e591cb", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8426CWE601(next) {\n return next;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-09415-28cc373101d054f8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9415_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09415-28cc373101d054f8", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9415_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-02466-de1b24ff78bb34a6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2466CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02466-de1b24ff78bb34a6", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2466CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-03855-3bd17e8ed0b8cbe3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3855_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03855-3bd17e8ed0b8cbe3", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3855_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "javascript-19587-3e0ed23ff903da1f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19587CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19587-3e0ed23ff903da1f", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19587CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08844-bc4a5cff0bc13cd8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8844CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08844-bc4a5cff0bc13cd8", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8844CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-07221-0525d2e97db3b5a9", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_7221_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07221-0525d2e97db3b5a9", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_7221_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-17236-3acdc501eca1632d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17236CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17236-3acdc501eca1632d", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17236CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-15369-268115c5e2d6de91", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15369_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15369-268115c5e2d6de91", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15369_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-10635-2a97159f302f50d8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10635_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10635-2a97159f302f50d8", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10635_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-15463-ef4e084cffad39fb", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_15463_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15463-ef4e084cffad39fb", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_15463_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-14371-6a1931c6ed2a68c2", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14371_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return None if host not in {'api.example.com'} else requests.get(url, timeout=2)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14371-6a1931c6ed2a68c2", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14371_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return None if host not in {'api.example.com'} else requests.get(url, timeout=2)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09369-5c3b6b95e8e01047", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9369CWE94(code) {\n return eval(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09369-5c3b6b95e8e01047", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9369CWE94(code) {\n return eval(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-14554-201b613ce74b843e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14554CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14554-201b613ce74b843e", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14554CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-15638-82c9cf0922deaced", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15638_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15638-82c9cf0922deaced", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15638_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-16104-430018c4517afbf6", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_16104_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16104-430018c4517afbf6", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_16104_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-01207-a3be19be32aa0b10", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1207_CWE_125(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01207-a3be19be32aa0b10", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1207_CWE_125(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-05983-1f65de0d63f19469", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5983CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05983-1f65de0d63f19469", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5983CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-03824-ca57e5fc9c3983b5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3824CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03824-ca57e5fc9c3983b5", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3824CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-06826-abbd27e85394fb36", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6826CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06826-abbd27e85394fb36", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6826CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-03311-2666895888cbe1b4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3311CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03311-2666895888cbe1b4", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3311CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-19714-e2af36d68dbae36b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19714CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19714-e2af36d68dbae36b", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19714CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07518-69bbfe531175ff99", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7518CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07518-69bbfe531175ff99", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7518CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-19957-f12f4218bddf3c3d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_19957_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19957-f12f4218bddf3c3d", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_19957_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18633-8ca4d3363db1f880", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18633CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18633-8ca4d3363db1f880", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18633CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-05068-5554358645c23cb8", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5068CWE915(target, body) {\n return Object.assign(target, body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05068-5554358645c23cb8", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5068CWE915(target, body) {\n return Object.assign(target, body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-16140-d1fc0826edc2ab6c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16140_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16140-d1fc0826edc2ab6c", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16140_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03865-eef32de21e4edeeb", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3865_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03865-eef32de21e4edeeb", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3865_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-07756-3de5a8c341c540bb", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_7756_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07756-3de5a8c341c540bb", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_7756_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-17736-f4c5a9299f4e4aba", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17736CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17736-f4c5a9299f4e4aba", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17736CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-16928-fc072b155153fba4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16928_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16928-fc072b155153fba4", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16928_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-14566-562dd8f7141bcddf", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14566_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14566-562dd8f7141bcddf", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14566_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-15232-0de6b6f45aca247b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_15232_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15232-0de6b6f45aca247b", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_15232_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04555-c5241f2f26620bc5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4555_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04555-c5241f2f26620bc5", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4555_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-17566-f2e6b2b03dd80102", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17566_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17566-f2e6b2b03dd80102", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17566_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-06547-3fdbe0a3ada4a12c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_6547_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06547-3fdbe0a3ada4a12c", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_6547_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-07701-b4d5ba60b8be7b33", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7701CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07701-b4d5ba60b8be7b33", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7701CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-07222-573f882f830f1c42", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7222_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07222-573f882f830f1c42", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7222_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "javascript-16565-5c068452b68b9050", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16565CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16565-5c068452b68b9050", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16565CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-15683-343dc7526c4294e0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_15683_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15683-343dc7526c4294e0", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_15683_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15846-b97c9f63234d2178", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15846CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15846-b97c9f63234d2178", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15846CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08580-e305d996a14830c6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8580CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08580-e305d996a14830c6", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8580CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-05787-f3d1f04e52c9ea22", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5787_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05787-f3d1f04e52c9ea22", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5787_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "python-05482-bd6eff1047950102", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5482_CWE_77(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05482-bd6eff1047950102", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5482_CWE_77(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-10909-ccd2c0754b8d5536", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_10909_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10909-ccd2c0754b8d5536", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_10909_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02168-74131d885ae34c96", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2168_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02168-74131d885ae34c96", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2168_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "cpp-01069-7e213a4d1c4bd1f4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_1069_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01069-7e213a4d1c4bd1f4", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_1069_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-07086-0daa9592ab7850b3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7086_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07086-0daa9592ab7850b3", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7086_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "c-10912-7e4cd733f63ec1a3", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_10912_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10912-7e4cd733f63ec1a3", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_10912_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07687-6f9bc2e70dd339d3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7687CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07687-6f9bc2e70dd339d3", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7687CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-04522-6c0a1485869b0661", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4522_CWE_77(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04522-6c0a1485869b0661", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4522_CWE_77(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-09475-16db983096b43eaa", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9475CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09475-16db983096b43eaa", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9475CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-03639-83d43282174fe328", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_3639_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03639-83d43282174fe328", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_3639_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-16516-82d4f664d06bab4c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16516CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16516-82d4f664d06bab4c", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16516CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-04555-aa06f47d3cc27fa8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_4555_CWE_190(int count) {\n int bytes = count * 91;\n int bytes = count * 91;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04555-aa06f47d3cc27fa8", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_4555_CWE_190(int count) {\n int bytes = count * 91;\n int bytes = count * 91;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "c-11439-440e02ab1c93b86e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11439_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11439-440e02ab1c93b86e", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11439_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19744-b8e7c4bc8befb3ff", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_19744_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19744-b8e7c4bc8befb3ff", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_19744_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-14061-1c15bfd9bae1931c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_14061_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14061-1c15bfd9bae1931c", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_14061_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15750-62104a63478a479c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15750CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15750-62104a63478a479c", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15750CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12404-3aa38c44d01c46d4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12404CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12404-3aa38c44d01c46d4", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12404CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-05264-2c81363b860f0d55", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_5264_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05264-2c81363b860f0d55", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_5264_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-03195-353010decb5f750f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3195_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03195-353010decb5f750f", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3195_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-09524-cc719951a2caeec6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9524CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09524-cc719951a2caeec6", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9524CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-19664-aa1b123b5a23981c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19664_CWE_787(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19664-aa1b123b5a23981c", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19664_CWE_787(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-13068-e51dc62c55631ea6", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13068_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13068-e51dc62c55631ea6", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13068_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-18729-8df76dd03b53e550", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_18729_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18729-8df76dd03b53e550", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_18729_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05276-87919da1fa57f8e5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5276_CWE_601(next_url):\n return next_url #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05276-87919da1fa57f8e5", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5276_CWE_601(next_url):\n return next_url #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-04275-b792f3e71515a3a5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4275CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04275-b792f3e71515a3a5", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4275CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-19799-4f55564cb4cef7dc", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_19799_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19799-4f55564cb4cef7dc", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_19799_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19268-e7b18d3e2d2d8890", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19268_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19268-e7b18d3e2d2d8890", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19268_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-19495-301ce65cd367d77d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19495CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19495-301ce65cd367d77d", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19495CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02671-81c310248c3b3755", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2671_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02671-81c310248c3b3755", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2671_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-04965-cb46235a91a4a461", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4965CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04965-cb46235a91a4a461", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4965CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-02742-bbcbe051d13a2325", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_2742_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02742-bbcbe051d13a2325", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_2742_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "cpp-00571-de2fcba3eacc717f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_571_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00571-de2fcba3eacc717f", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_571_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-00791-903b49588d6624c2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_791_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00791-903b49588d6624c2", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_791_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-11381-e1544c106512d2e5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11381CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11381-e1544c106512d2e5", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11381CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-14696-741257ceeb3e650a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14696CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14696-741257ceeb3e650a", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14696CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-18439-0c5213fd577a5171", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_18439_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18439-0c5213fd577a5171", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_18439_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07441-42dd99239de1caef", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7441_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07441-42dd99239de1caef", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7441_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-08512-3d80e12cab44fa98", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8512CWE77(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08512-3d80e12cab44fa98", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8512CWE77(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-03982-938179a52a47fdc1", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3982CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03982-938179a52a47fdc1", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3982CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-18029-c29a11d6ec9c2d61", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18029CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18029-c29a11d6ec9c2d61", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18029CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-13903-5c4d1d2c8b819500", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13903_CWE_862(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13903-5c4d1d2c8b819500", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13903_CWE_862(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-09400-f92d3e521a313e63", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9400CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09400-f92d3e521a313e63", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9400CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-15349-85cf67bcc0b17a64", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15349_CWE_94(expr):\n import ast\n return ast.literal_eval(expr)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15349-85cf67bcc0b17a64", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15349_CWE_94(expr):\n import ast\n return ast.literal_eval(expr)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-02839-d76719a93e683e05", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2839CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02839-d76719a93e683e05", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2839CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-15000-f4367c75ad3958f6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15000CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15000-f4367c75ad3958f6", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15000CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-07738-222fedd945a65d07", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7738_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07738-222fedd945a65d07", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7738_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "c-02519-ad7d89de25dc1b95", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2519_CWE_590() {\n char local[8];\n local[0] = 0;\n free(local);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-590\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02519-ad7d89de25dc1b95", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2519_CWE_590() {\n char local[8];\n local[0] = 0;\n free(local);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-590\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "javascript-06340-34cfe814b639eded", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6340CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06340-34cfe814b639eded", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6340CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-13876-8e811f7f3a32ecfa", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13876CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13876-8e811f7f3a32ecfa", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13876CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-13265-0ca1b01c0736283f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_13265_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 47;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13265-0ca1b01c0736283f", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_13265_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 47;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02457-dd753821cfa1fa3b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2457_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02457-dd753821cfa1fa3b", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2457_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "cpp-02500-0843e961632a7c2c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2500_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02500-0843e961632a7c2c", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2500_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "javascript-17332-7c5600908d4c9882", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17332CWE476(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17332-7c5600908d4c9882", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17332CWE476(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12729-9f48c3b78bac188c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12729_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12729-9f48c3b78bac188c", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12729_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-06077-34c54693a14072af", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6077_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06077-34c54693a14072af", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6077_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-00877-eb29a07e2e23ccc2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_877_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00877-eb29a07e2e23ccc2", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_877_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-06504-5a373a1e5c3525d3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6504CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06504-5a373a1e5c3525d3", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6504CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-09048-600ced1bd04c9d5e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_9048_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09048-600ced1bd04c9d5e", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_9048_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-18905-a3d56850efe14535", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18905CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18905-a3d56850efe14535", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18905CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18210-6b00fa29c72b64ff", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18210CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18210-6b00fa29c72b64ff", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18210CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19462-8c12a32a9fb0b1d3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_19462_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19462-8c12a32a9fb0b1d3", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_19462_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-16920-ab7ff9fb44be570f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_16920_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16920-ab7ff9fb44be570f", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_16920_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-04675-84bdccd52be3b632", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_4675_CWE_190(int count) {\n int bytes = count * 75;\n int bytes = count * 75;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04675-84bdccd52be3b632", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_4675_CWE_190(int count) {\n int bytes = count * 75;\n int bytes = count * 75;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "javascript-04157-84942e081b3349b4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4157CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04157-84942e081b3349b4", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4157CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-05331-f3271d35982b999b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5331CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05331-f3271d35982b999b", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5331CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-18749-285ecbfed13d1a7a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18749CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18749-285ecbfed13d1a7a", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18749CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08988-c33a7e07db000983", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8988CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08988-c33a7e07db000983", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8988CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-18017-fbd385633f9526f8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18017CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18017-fbd385633f9526f8", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18017CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12593-c8005599d9a2e705", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12593_CWE_121(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12593-c8005599d9a2e705", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12593_CWE_121(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-00360-5fa002eaab5548ea", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_360_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00360-5fa002eaab5548ea", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_360_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-17678-426e1a8f89e366dc", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17678CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17678-426e1a8f89e366dc", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17678CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-14249-866f1d758499132c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14249_CWE_200(user):\n return {'id': user.id}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14249-866f1d758499132c", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14249_CWE_200(user):\n return {'id': user.id}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13894-fed996f4c6332e31", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13894CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13894-fed996f4c6332e31", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13894CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-13764-203b82ef1125537e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13764CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13764-203b82ef1125537e", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13764CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-09941-a072e66f6c82237f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_9941_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09941-a072e66f6c82237f", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_9941_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-18408-45065f1ff58b1271", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18408CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18408-45065f1ff58b1271", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18408CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07692-31771c8c6513b8ef", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7692_CWE_476(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07692-31771c8c6513b8ef", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7692_CWE_476(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-06175-ba7c293ae1137a61", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6175_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06175-ba7c293ae1137a61", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6175_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-15499-2c72f1338ebb3d76", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15499CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15499-2c72f1338ebb3d76", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15499CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08080-a185adb23e5b120c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8080CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08080-a185adb23e5b120c", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8080CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-16013-4eabed47ed1137a4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16013CWE121(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16013-4eabed47ed1137a4", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16013CWE121(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-18220-d688ff3b4ba94820", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18220CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18220-d688ff3b4ba94820", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18220CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-05623-73ddd421ef53ec0a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5623_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05623-73ddd421ef53ec0a", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5623_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "javascript-08037-7e1e849ca3c244dd", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8037CWE798() {\n return 'hardcoded-token';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08037-7e1e849ca3c244dd", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8037CWE798() {\n return 'hardcoded-token';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-17732-45a36a97f961940a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17732_CWE_77(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17732-45a36a97f961940a", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17732_CWE_77(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-10186-4c6a3561222e78b0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10186CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10186-4c6a3561222e78b0", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10186CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08797-73fd35793b16e926", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8797CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08797-73fd35793b16e926", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8797CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-08139-ae44a06a73bdc7bf", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_8139_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08139-ae44a06a73bdc7bf", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_8139_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-07142-0aba2578f3f8d24c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_7142_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07142-0aba2578f3f8d24c", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_7142_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-05271-a7a47a6f7349ee98", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5271CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05271-a7a47a6f7349ee98", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5271CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-17535-46f8b014c1a48a65", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17535_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17535-46f8b014c1a48a65", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17535_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-06854-9b2f1fa52c4dcd60", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6854CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06854-9b2f1fa52c4dcd60", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6854CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-01585-5fd9498d3d4bbba5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1585CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01585-5fd9498d3d4bbba5", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1585CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-16776-5d44c4dc504a8f69", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16776CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16776-5d44c4dc504a8f69", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16776CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19052-61ad189c8a642743", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_19052_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19052-61ad189c8a642743", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_19052_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-15021-2c9690314139b933", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_15021_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15021-2c9690314139b933", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_15021_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-13887-70ec888b9f97a5da", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13887CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13887-70ec888b9f97a5da", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13887CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05132-63cf46b1c9b7fdad", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5132CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05132-63cf46b1c9b7fdad", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5132CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-10926-d5f6970ef9c0f71a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10926CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10926-d5f6970ef9c0f71a", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10926CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-04866-3bcf494bacb53ed7", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4866CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04866-3bcf494bacb53ed7", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4866CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-14776-80e17b408afa99ec", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14776CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14776-80e17b408afa99ec", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14776CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01569-2d6462b310b67f50", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_1569_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01569-2d6462b310b67f50", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_1569_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-06188-bce87f9c16b9845d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6188_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06188-bce87f9c16b9845d", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6188_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-09902-83f841f3aaddcdaf", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_9902_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09902-83f841f3aaddcdaf", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_9902_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-09480-270f7ca92f8ba60a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9480_CWE_79(name):\n import html\n return '

' + name + '

' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09480-270f7ca92f8ba60a", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9480_CWE_79(name):\n import html\n return '

' + name + '

' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-07599-cf1466089bef32d9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7599CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07599-cf1466089bef32d9", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7599CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-10115-3077d3fceb536604", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10115CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10115-3077d3fceb536604", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10115CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19781-47c6a9b87a09ae16", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_19781_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19781-47c6a9b87a09ae16", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_19781_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07405-25f36787121e0f5e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_7405_CWE_190(int count) {\n int bytes = count * 20;\n int bytes = count * 20;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07405-25f36787121e0f5e", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_7405_CWE_190(int count) {\n int bytes = count * 20;\n int bytes = count * 20;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "cpp-13343-7b56c1682e99b61b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13343_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13343-7b56c1682e99b61b", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13343_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02469-d1d221d8cd8b58ef", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_2469_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02469-d1d221d8cd8b58ef", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_2469_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-15353-4cc56bfdb2732851", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15353_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15353-4cc56bfdb2732851", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15353_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08649-cec7b19c5078a2ed", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8649CWE94(code) {\n return eval(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08649-cec7b19c5078a2ed", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8649CWE94(code) {\n return eval(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-18288-95195336f8fce9e8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18288_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18288-95195336f8fce9e8", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18288_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-00206-f1ab3b468aedf44d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_206_CWE_601(next_url):\n return next_url #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00206-f1ab3b468aedf44d", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_206_CWE_601(next_url):\n return next_url #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-19336-f997cb78922a30db", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19336CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19336-f997cb78922a30db", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19336CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-18205-f300828109b4521c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18205_CWE_122(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18205-f300828109b4521c", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18205_CWE_122(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-05844-92f25104ce31b7d0", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_5844_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05844-92f25104ce31b7d0", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_5844_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-10099-cf40045bcacb4a04", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10099_CWE_94(expr):\n import ast\n return ast.literal_eval(expr)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10099-cf40045bcacb4a04", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10099_CWE_94(expr):\n import ast\n return ast.literal_eval(expr)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-17886-2e6b018cbf1bbe37", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_17886_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17886-2e6b018cbf1bbe37", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_17886_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01720-327140901e63e328", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1720_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01720-327140901e63e328", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1720_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-19587-9603ce1735a17437", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19587CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19587-9603ce1735a17437", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19587CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-03743-5f9ed0919e6615a7", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3743CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03743-5f9ed0919e6615a7", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3743CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-02971-fb981977c36fb1e3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2971CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02971-fb981977c36fb1e3", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2971CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-05890-ded79cdd3a3d03ad", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5890CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05890-ded79cdd3a3d03ad", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5890CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-18459-dbcc0efbb86d6052", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18459CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18459-dbcc0efbb86d6052", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18459CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08172-361740c3fa406f4a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8172CWE476(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08172-361740c3fa406f4a", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8172CWE476(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-09471-00f4b16bca350c43", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9471_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09471-00f4b16bca350c43", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9471_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-05398-0a9214f7a8152107", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5398_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05398-0a9214f7a8152107", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5398_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-18993-5eda2395df07a7e6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18993CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18993-5eda2395df07a7e6", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18993CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-05351-05315a5bf0731b69", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5351CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05351-05315a5bf0731b69", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5351CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-01979-e1e60a6a304bc7dc", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1979CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01979-e1e60a6a304bc7dc", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1979CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-15496-1e04b55200857892", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15496_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15496-1e04b55200857892", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15496_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07044-87f1c82f0cc6b134", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7044CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07044-87f1c82f0cc6b134", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7044CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-08186-6e5d9034207ff4ab", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_8186_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-08186-6e5d9034207ff4ab", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_8186_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-02646-17b64f8e19f4d9c2", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2646_CWE_416(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02646-17b64f8e19f4d9c2", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2646_CWE_416(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-17430-953324dc92c591de", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17430CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17430-953324dc92c591de", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17430CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12667-b11f2c1d9a99ab1d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12667_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12667-b11f2c1d9a99ab1d", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12667_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-13569-db50f0c2283ebf5c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_13569_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13569-db50f0c2283ebf5c", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_13569_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-19550-27214f793ccb0f9c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19550_CWE_120(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19550-27214f793ccb0f9c", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19550_CWE_120(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07581-680054668072f661", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7581CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07581-680054668072f661", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7581CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-18662-896f9e7d8469dc39", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18662_CWE_77(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18662-896f9e7d8469dc39", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18662_CWE_77(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17468-18659d6e8c7bacf6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17468CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17468-18659d6e8c7bacf6", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17468CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04661-8834fb9073957f52", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4661_CWE_434(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04661-8834fb9073957f52", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4661_CWE_434(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-08694-70ddacb90009b1f0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8694_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08694-70ddacb90009b1f0", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8694_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-00385-be45bd36f879e83e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_385_CWE_190(int count) {\n int bytes = count * 28;\n int bytes = count * 28;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00385-be45bd36f879e83e", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_385_CWE_190(int count) {\n int bytes = count * 28;\n int bytes = count * 28;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-04009-048948a5cd542068", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4009_CWE_200(user):\n return user.__dict__ #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04009-048948a5cd542068", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4009_CWE_200(user):\n return user.__dict__ #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-07872-027314f8c7411ad7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_7872_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07872-027314f8c7411ad7", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_7872_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "python-12007-31c4e03c437313fe", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12007_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12007-31c4e03c437313fe", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12007_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-18032-2d21b3c9b651ec29", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18032_CWE_77(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18032-2d21b3c9b651ec29", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18032_CWE_77(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-16380-cca9ee088166b39e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16380CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16380-cca9ee088166b39e", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16380CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15101-1a7a1d195900d258", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15101CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15101-1a7a1d195900d258", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15101CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02728-2948b151dda72d29", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2728_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02728-2948b151dda72d29", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2728_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "javascript-03946-c2421bebaaaf967f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3946CWE863(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03946-c2421bebaaaf967f", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3946CWE863(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-10837-40e4c8943121e0ee", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10837_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10837-40e4c8943121e0ee", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10837_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-16191-e4ce0b6483cb9a07", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16191_CWE_434(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16191-e4ce0b6483cb9a07", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16191_CWE_434(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04425-fd31fb5be4c19a3c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4425_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04425-fd31fb5be4c19a3c", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4425_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "javascript-09774-76fb27d6058ee1b8", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9774CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09774-76fb27d6058ee1b8", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9774CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-15583-d64287e6bb9a1b07", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_15583_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15583-d64287e6bb9a1b07", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_15583_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-04270-92433cad584da17b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4270CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04270-92433cad584da17b", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4270CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-13777-e42f74007247f47c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13777_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13777-e42f74007247f47c", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13777_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-10517-7eec0c7275c0f66c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10517CWE125(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10517-7eec0c7275c0f66c", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10517CWE125(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-14669-dae71ab2ae43e6bb", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_14669_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14669-dae71ab2ae43e6bb", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_14669_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-05620-1c6ef42e55706b4d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5620CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05620-1c6ef42e55706b4d", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5620CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-13267-54fb648b19b81f11", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13267_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13267-54fb648b19b81f11", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13267_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17705-6f84d9244cbf6da8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_17705_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 96;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17705-6f84d9244cbf6da8", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_17705_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 96;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12281-7114650ae2d03598", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_12281_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12281-7114650ae2d03598", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_12281_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08672-2d847ecb80c7692b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8672CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08672-2d847ecb80c7692b", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8672CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-19834-616cd5643f813b10", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19834_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19834-616cd5643f813b10", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19834_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19577-8cf95aa1cfb89a6a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_19577_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19577-8cf95aa1cfb89a6a", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_19577_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-06725-7b340610a9ff2b55", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_6725_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06725-7b340610a9ff2b55", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_6725_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "python-19805-0702d0490110f11a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19805_CWE_400(n):\n n = min(int(n), 1000)\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19805-0702d0490110f11a", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19805_CWE_400(n):\n n = min(int(n), 1000)\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19721-c081ed96973e5a0a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_19721_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19721-c081ed96973e5a0a", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_19721_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-02149-5b35762d6571e802", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2149CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02149-5b35762d6571e802", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2149CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-11574-38c1c2011415dd26", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_11574_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11574-38c1c2011415dd26", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_11574_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19868-73e15f31902dd61c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_19868_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19868-73e15f31902dd61c", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_19868_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12472-caef771808307a17", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_12472_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12472-caef771808307a17", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_12472_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04424-de05bbb6f5d038b3", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_4424_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04424-de05bbb6f5d038b3", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_4424_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-10266-4539cd4d29504fad", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10266_CWE_601(next_url):\n return '/home' if not next_url.startswith('/') else next_url\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10266-4539cd4d29504fad", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10266_CWE_601(next_url):\n return '/home' if not next_url.startswith('/') else next_url\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05483-678c291b818444a2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5483CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05483-678c291b818444a2", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5483CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-00307-1ce141fa99c5fdfa", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_307_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00307-1ce141fa99c5fdfa", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_307_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "java-13847-06a1cebdc1eca43b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13847CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13847-06a1cebdc1eca43b", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13847CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-02749-afc60421ad727146", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_2749_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02749-afc60421ad727146", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_2749_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-00482-8e3fe1a586b09550", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_482_CWE_352(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00482-8e3fe1a586b09550", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_482_CWE_352(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-14495-75da4e99072269c4", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_14495_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 45;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14495-75da4e99072269c4", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_14495_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 45;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09815-9b02455397e6a1e8", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9815CWE22(name) {\n return fs.readFileSync('/srv/data/' + name);\n return fs.readFileSync('/srv/data/' + name);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09815-9b02455397e6a1e8", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9815CWE22(name) {\n return fs.readFileSync('/srv/data/' + name);\n return fs.readFileSync('/srv/data/' + name);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-05278-8978fbe321d4dd91", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5278_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05278-8978fbe321d4dd91", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5278_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "python-18285-5ad5662ffc46a28a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18285_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return p if str(p).startswith(str(Path(base).resolve())) else None\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18285-5ad5662ffc46a28a", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18285_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return p if str(p).startswith(str(Path(base).resolve())) else None\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-18494-beab9fd5d5deb475", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18494_CWE_787(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18494-beab9fd5d5deb475", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18494_CWE_787(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-14643-98ca72d002655843", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14643CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14643-98ca72d002655843", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14643CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02167-a76f79f8aa0ac6be", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_2167_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02167-a76f79f8aa0ac6be", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_2167_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "cpp-13022-1a23e89079b9798e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13022_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13022-1a23e89079b9798e", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13022_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-13010-fb83239e1e4ac76b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13010_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13010-fb83239e1e4ac76b", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13010_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04179-ecec37788156d8e5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4179CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04179-ecec37788156d8e5", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4179CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-05659-3dbe22e8e86efc9a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5659_CWE_200(user):\n return user.__dict__ #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05659-3dbe22e8e86efc9a", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5659_CWE_200(user):\n return user.__dict__ #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-17716-7a4427842d22114d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17716_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17716-7a4427842d22114d", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17716_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-01273-24e57425a60b4320", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1273CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01273-24e57425a60b4320", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1273CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-03040-38309f85af91f4fc", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3040_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03040-38309f85af91f4fc", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3040_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "python-15144-6fbda8d5865c0ccf", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15144_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15144-6fbda8d5865c0ccf", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15144_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01616-0d62ce90df959238", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_1616_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01616-0d62ce90df959238", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_1616_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "cpp-19317-7f47caec388c0cfd", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_19317_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19317-7f47caec388c0cfd", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_19317_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19648-19c33d51098406a7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_19648_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19648-19c33d51098406a7", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_19648_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-05559-2512172d167a6ba9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5559CWE94(code) {\n return eval(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05559-2512172d167a6ba9", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5559CWE94(code) {\n return eval(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-00026-203c93586149b531", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_26_CWE_601(next_url):\n return next_url #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00026-203c93586149b531", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_26_CWE_601(next_url):\n return next_url #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-12674-e96eecef5c22899d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12674CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12674-e96eecef5c22899d", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12674CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-06123-c089f152982ec23f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6123CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06123-c089f152982ec23f", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6123CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-16106-09c7c4826f33009f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_16106_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16106-09c7c4826f33009f", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_16106_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-02823-77123d0a09e057c4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2823CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02823-77123d0a09e057c4", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2823CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-09625-d2dd6ab5065178f5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9625CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09625-d2dd6ab5065178f5", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9625CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-10154-10c9ce35e05ed1fe", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10154CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10154-10c9ce35e05ed1fe", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10154CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15691-0ff965a103a79c42", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15691CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15691-0ff965a103a79c42", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15691CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-14838-41078cea8c5a7f60", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14838CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14838-41078cea8c5a7f60", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14838CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08650-9967688b1157103e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8650CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08650-9967688b1157103e", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8650CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-19974-52752876257477b9", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_19974_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19974-52752876257477b9", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_19974_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-01912-c3db9c12d339d6e0", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1912CWE77(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-01912-c3db9c12d339d6e0", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1912CWE77(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-16576-e21339403f3b242a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16576_CWE_416(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16576-e21339403f3b242a", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16576_CWE_416(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-17469-3824f813398f8524", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17469_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17469-3824f813398f8524", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17469_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11109-c457d426579e09c8", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11109CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11109-c457d426579e09c8", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11109CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-11640-a914a233543e0ecf", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11640CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11640-a914a233543e0ecf", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11640CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13634-7d5f7b7ceeb2e460", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13634_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13634-7d5f7b7ceeb2e460", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13634_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07744-93baa752dbf27e5d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7744_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07744-93baa752dbf27e5d", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7744_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "cpp-05363-b27d3e85a01135f0", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_5363_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05363-b27d3e85a01135f0", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_5363_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-01924-3988128e2ad0075b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1924_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01924-3988128e2ad0075b", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1924_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-16283-0ede9983031b98a6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16283CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16283-0ede9983031b98a6", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16283CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-13494-70f212c448ee9464", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13494_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13494-70f212c448ee9464", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13494_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-19760-1b8c8f6d0efe185f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19760_CWE_120(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19760-1b8c8f6d0efe185f", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19760_CWE_120(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-02137-85aa61bbb545f3c9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2137CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02137-85aa61bbb545f3c9", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2137CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-02295-9e40b16ee6909f64", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2295_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02295-9e40b16ee6909f64", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2295_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "javascript-18580-44967c8cd822bc3f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18580CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18580-44967c8cd822bc3f", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18580CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12149-4985ab67101f836e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12149_CWE_200(user):\n return {'id': user.id}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12149-4985ab67101f836e", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12149_CWE_200(user):\n return {'id': user.id}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07082-4addf2e642662bb4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7082CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07082-4addf2e642662bb4", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7082CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-13571-51c4d51ca66f436e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13571CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13571-51c4d51ca66f436e", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13571CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-04435-43cbf2ab161c749e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_4435_CWE_190(int count) {\n int bytes = count * 29;\n int bytes = count * 29;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04435-43cbf2ab161c749e", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_4435_CWE_190(int count) {\n int bytes = count * 29;\n int bytes = count * 29;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "cpp-06503-25f8d6a0a231c66a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_6503_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06503-25f8d6a0a231c66a", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_6503_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-09811-9052ef51b213068f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_9811_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09811-9052ef51b213068f", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_9811_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-02550-6751693e924748aa", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2550CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02550-6751693e924748aa", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2550CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-01511-2a5f47abd0fff1f0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1511CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01511-2a5f47abd0fff1f0", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1511CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-00058-88b6d89d794df045", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle58CWE915(target, body) {\n return Object.assign(target, body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00058-88b6d89d794df045", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle58CWE915(target, body) {\n return Object.assign(target, body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-16459-5c032f9af58fbedb", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16459CWE94(code) {\n return JSON.parse(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16459-5c032f9af58fbedb", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16459CWE94(code) {\n return JSON.parse(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-16962-e9657cbfe168549b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16962CWE352(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16962-e9657cbfe168549b", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16962CWE352(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01048-7c701223621958be", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1048_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01048-7c701223621958be", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1048_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-17490-20829c6fb9d7348f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17490CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17490-20829c6fb9d7348f", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17490CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19442-460cd5e287b43dab", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19442_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19442-460cd5e287b43dab", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19442_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-04027-3fd1cea974d74f8f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4027CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04027-3fd1cea974d74f8f", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4027CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-11690-1a197a56dc1bb3bb", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11690CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11690-1a197a56dc1bb3bb", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11690CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00783-36d0ba83933b3ba6", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_783_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00783-36d0ba83933b3ba6", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_783_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-08283-51322afe397e3a7d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8283CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08283-51322afe397e3a7d", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8283CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-04243-d13a614f0356a1aa", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4243CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04243-d13a614f0356a1aa", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4243CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-04737-6e2c0e1f48fc1512", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4737CWE798() {\n return 'hardcoded-token';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04737-6e2c0e1f48fc1512", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4737CWE798() {\n return 'hardcoded-token';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-07652-48f98658193d2100", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7652_CWE_352(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07652-48f98658193d2100", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7652_CWE_352(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-11127-f0e89c8d6355af06", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11127_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11127-f0e89c8d6355af06", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11127_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05920-c0865d0ece946479", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5920CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05920-c0865d0ece946479", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5920CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-13398-6c5190e3e1874b6a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13398CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13398-6c5190e3e1874b6a", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13398CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04660-478bd61030e1de5f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4660CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04660-478bd61030e1de5f", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4660CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-06995-ca204926153515d3", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6995_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06995-ca204926153515d3", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6995_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "cpp-13565-8f07857cb4697ee1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_13565_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 39;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13565-8f07857cb4697ee1", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_13565_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 39;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-13679-542dc936801a5a99", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_13679_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13679-542dc936801a5a99", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_13679_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-01006-f5f15a9c752357f3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1006CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01006-f5f15a9c752357f3", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1006CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-09243-718b30ce06e66bb7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_9243_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09243-718b30ce06e66bb7", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_9243_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-07867-409e93268eeb224c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7867_CWE_125(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07867-409e93268eeb224c", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7867_CWE_125(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-19657-90435ddcf8d6eb2e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19657_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19657-90435ddcf8d6eb2e", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19657_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03705-e4967850c40ee1a3", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3705_CWE_122(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03705-e4967850c40ee1a3", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3705_CWE_122(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-11161-a06102a6294919a4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11161CWE918(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11161-a06102a6294919a4", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11161CWE918(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04934-895618d4d4b8285f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_4934_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04934-895618d4d4b8285f", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_4934_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-08473-4a4dd409ef5fb0e5", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8473_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08473-4a4dd409ef5fb0e5", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8473_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "python-17593-bbda55f74ec9ff5b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17593_CWE_862(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17593-bbda55f74ec9ff5b", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17593_CWE_862(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-19566-06f9930cb511fc41", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19566_CWE_601(next_url):\n return '/home' if not next_url.startswith('/') else next_url\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19566-06f9930cb511fc41", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19566_CWE_601(next_url):\n return '/home' if not next_url.startswith('/') else next_url\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-01490-0ba0696bf25d0a34", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1490CWE306(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-01490-0ba0696bf25d0a34", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1490CWE306(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-19037-3d41597caef5f34a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19037CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19037-3d41597caef5f34a", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19037CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-08104-6188709d538604b5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8104_CWE_787(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08104-6188709d538604b5", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8104_CWE_787(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-15885-4885a372a04f763e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15885CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15885-4885a372a04f763e", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15885CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-07713-6bde2a98ac452456", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7713CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07713-6bde2a98ac452456", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7713CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-00000-a1d6a1a46ae7d19f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample0CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00000-a1d6a1a46ae7d19f", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample0CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-03001-ec5a47210a630111", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3001_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03001-ec5a47210a630111", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3001_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-13862-3052faf2ad6b1fe7", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13862_CWE_77(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13862-3052faf2ad6b1fe7", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13862_CWE_77(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-04056-8fe949d63e2694a4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4056CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04056-8fe949d63e2694a4", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4056CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-07898-709936c7db5a4095", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7898CWE78(host) {\n return require('child_process').exec('ping -c 1 ' + host);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07898-709936c7db5a4095", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7898CWE78(host) {\n return require('child_process').exec('ping -c 1 ' + host);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-19702-825b3eb96ab01157", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_19702_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19702-825b3eb96ab01157", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_19702_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04239-30980e92e6bc648d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4239CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04239-30980e92e6bc648d", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4239CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-10763-b1381dbcaf2c62db", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10763_CWE_121(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10763-b1381dbcaf2c62db", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10763_CWE_121(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-06711-d296cec55326a3d8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_6711_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06711-d296cec55326a3d8", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_6711_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-10905-73317416176a5aa9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10905CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10905-73317416176a5aa9", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10905CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-00561-d0c3bc07372bfc3f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_561_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00561-d0c3bc07372bfc3f", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_561_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-04578-ebc726210770eecf", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4578CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04578-ebc726210770eecf", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4578CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-07533-26ada04707082983", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_7533_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07533-26ada04707082983", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_7533_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-17372-f52dafd80fdb63b4", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17372_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17372-f52dafd80fdb63b4", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17372_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15327-51a90b42cc0584c4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15327CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15327-51a90b42cc0584c4", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15327CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-11371-9c8996a16d7b0737", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11371CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11371-9c8996a16d7b0737", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11371CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00391-a03f1317c615ec50", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_391_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00391-a03f1317c615ec50", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_391_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-02930-9d1f77d2f45a9f49", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2930CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02930-9d1f77d2f45a9f49", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2930CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-14652-a0f0d77610b67228", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14652CWE352(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14652-a0f0d77610b67228", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14652CWE352(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-01763-4129bceb7464dbc5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1763CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-01763-4129bceb7464dbc5", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1763CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-13309-1f8f25275dbdcd2b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13309CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13309-1f8f25275dbdcd2b", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13309CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12577-51d2d84b1fb30661", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12577CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12577-51d2d84b1fb30661", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12577CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-00704-eb31e1256e3e9756", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample704CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00704-eb31e1256e3e9756", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample704CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-09034-9509b88ea8d899ea", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9034_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09034-9509b88ea8d899ea", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9034_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "java-18528-2ac93b398d2fb8d6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18528CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18528-2ac93b398d2fb8d6", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18528CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-00052-7e24188dba907d82", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_52_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00052-7e24188dba907d82", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_52_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "c-02715-8c944369cf44c336", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2715_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02715-8c944369cf44c336", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2715_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "cpp-18513-8d0c6510c87c33a2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_18513_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18513-8d0c6510c87c33a2", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_18513_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04145-ddc0c15a88dc4fcf", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4145CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04145-ddc0c15a88dc4fcf", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4145CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-05621-33909f6f548d8e5f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5621_CWE_434(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05621-33909f6f548d8e5f", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5621_CWE_434(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-12122-2d55a45274893712", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12122_CWE_77(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12122-2d55a45274893712", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12122_CWE_77(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-02506-2c52c3d2612a69c1", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2506CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02506-2c52c3d2612a69c1", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2506CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-00538-5e1d80cfbb8375d8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_538_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00538-5e1d80cfbb8375d8", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_538_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "cpp-08270-7fb05f2e05e00cf7", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_8270_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-08270-7fb05f2e05e00cf7", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_8270_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-18240-e3394b5c4fcd5451", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_18240_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18240-e3394b5c4fcd5451", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_18240_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-15773-173ff763afd11e0d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15773_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15773-173ff763afd11e0d", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15773_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-10672-aed7a8a9278b78cc", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10672CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10672-aed7a8a9278b78cc", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10672CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-18619-c4c431aca9276822", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_18619_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18619-c4c431aca9276822", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_18619_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-09359-7e16dc1e37da6844", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_9359_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09359-7e16dc1e37da6844", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_9359_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "python-05739-db331c380f5f97a9", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5739_CWE_94(expr):\n import ast\n return eval(expr) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05739-db331c380f5f97a9", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5739_CWE_94(expr):\n import ast\n return eval(expr) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-16436-27ac5912a4fb2ebb", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_16436_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16436-27ac5912a4fb2ebb", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_16436_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-18329-1a320f93fe214aef", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_18329_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18329-1a320f93fe214aef", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_18329_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-14244-d8cb3fe6a8fa4684", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_14244_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14244-d8cb3fe6a8fa4684", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_14244_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-19648-5bc3ef5168a5972d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19648CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19648-5bc3ef5168a5972d", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19648CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-06846-aa541da919ae1e25", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_6846_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06846-aa541da919ae1e25", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_6846_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "cpp-17882-a19046fffc75b856", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17882_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17882-a19046fffc75b856", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17882_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-14727-28c09b6515e96f9c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_14727_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14727-28c09b6515e96f9c", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_14727_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17223-9765ab0224e08b2b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_17223_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17223-9765ab0224e08b2b", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_17223_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08951-6e53db023e19326d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8951CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08951-6e53db023e19326d", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8951CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-12131-0aff5248141ae66a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12131CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12131-0aff5248141ae66a", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12131CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-09434-27b0634b7ffff1f3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9434CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09434-27b0634b7ffff1f3", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9434CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-01135-008c530fdc48b8ec", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_1135_CWE_190(int count) {\n int bytes = count * 84;\n int bytes = count * 84;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01135-008c530fdc48b8ec", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_1135_CWE_190(int count) {\n int bytes = count * 84;\n int bytes = count * 84;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-04846-c86f9e9e000247d5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4846_CWE_863(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04846-c86f9e9e000247d5", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4846_CWE_863(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-07701-0c8a4331e3a304fc", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_7701_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07701-0c8a4331e3a304fc", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_7701_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-05812-da5b663267ea9e8d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5812_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05812-da5b663267ea9e8d", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5812_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-11880-86115f225da863cc", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11880_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11880-86115f225da863cc", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11880_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-19522-3e70185326a22377", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19522_CWE_476(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19522-3e70185326a22377", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19522_CWE_476(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-15307-673f143c82bf02be", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15307_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15307-673f143c82bf02be", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15307_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17493-7497fec65bc11690", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_17493_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17493-7497fec65bc11690", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_17493_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08074-69864ee756f5f4c6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8074CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08074-69864ee756f5f4c6", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8074CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-19424-44d84c4c026480dd", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19424CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19424-44d84c4c026480dd", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19424CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-07675-191b7e039cf2e6c7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_7675_CWE_190(int count) {\n int bytes = count * 61;\n int bytes = count * 61;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07675-191b7e039cf2e6c7", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_7675_CWE_190(int count) {\n int bytes = count * 61;\n int bytes = count * 61;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "java-19246-abc814b0c9f0ac17", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19246CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19246-abc814b0c9f0ac17", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19246CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-11613-c1bb109f25b468cc", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11613CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11613-c1bb109f25b468cc", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11613CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08044-b36b022c5770d8f9", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8044_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08044-b36b022c5770d8f9", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8044_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "python-18056-c2787c1ca09bfa27", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18056_CWE_863(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18056-c2787c1ca09bfa27", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18056_CWE_863(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-16854-e2445e0b8c8dc3db", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_16854_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16854-e2445e0b8c8dc3db", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_16854_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-06545-53f74a6f03684c6d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6545_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06545-53f74a6f03684c6d", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6545_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "c-03105-7cfbfd0a30f6258e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3105_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03105-7cfbfd0a30f6258e", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3105_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "c-08215-d1fc54ab98fefea8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_8215_CWE_190(int count) {\n int bytes = count * 64;\n int bytes = count * 64;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08215-d1fc54ab98fefea8", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_8215_CWE_190(int count) {\n int bytes = count * 64;\n int bytes = count * 64;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "cpp-07352-9157f655a9236f5d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_7352_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07352-9157f655a9236f5d", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_7352_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-19575-49c3ebc88864b825", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19575_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return p if str(p).startswith(str(Path(base).resolve())) else None\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19575-49c3ebc88864b825", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19575_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return p if str(p).startswith(str(Path(base).resolve())) else None\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-05517-5cbb0d8b534c90f0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5517_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05517-5cbb0d8b534c90f0", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5517_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-06223-1883339b83a86302", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6223CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06223-1883339b83a86302", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6223CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-10070-2adbe7ed3d2f6c3c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10070CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10070-2adbe7ed3d2f6c3c", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10070CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07125-86a79202d644d92f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7125CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07125-86a79202d644d92f", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7125CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-13909-3fdd692c83731598", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_13909_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13909-3fdd692c83731598", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_13909_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17999-051dc44de1381c48", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17999CWE200(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17999-051dc44de1381c48", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17999CWE200(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-19526-95b4edad0e0ac31a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19526CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19526-95b4edad0e0ac31a", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19526CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-06957-be9a605aa6a0a4ab", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6957_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06957-be9a605aa6a0a4ab", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6957_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-07515-72006c25844d5133", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7515CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07515-72006c25844d5133", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7515CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-03749-d6c9f81b8aef1511", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3749CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03749-d6c9f81b8aef1511", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3749CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-06801-e89dded0df501d35", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6801CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06801-e89dded0df501d35", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6801CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-12744-68bea773c81d0bb4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_12744_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12744-68bea773c81d0bb4", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_12744_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-06488-9e83b3f2e19c6079", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6488_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06488-9e83b3f2e19c6079", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6488_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-03497-fb2f8a9792928bfc", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3497_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03497-fb2f8a9792928bfc", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3497_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-14993-1b34d5517cb8b8ef", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14993CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14993-1b34d5517cb8b8ef", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14993CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04398-d1ebf19b4aaa6d90", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4398_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04398-d1ebf19b4aaa6d90", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4398_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-15634-395cce65328a7f18", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15634_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15634-395cce65328a7f18", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15634_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01133-b40f8920e2e3cb16", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_1133_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01133-b40f8920e2e3cb16", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_1133_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-08596-46ad80de1484fe88", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_8596_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08596-46ad80de1484fe88", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_8596_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-08179-9ca4afa5fb37bf03", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8179_CWE_200(user):\n return user.__dict__ #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08179-9ca4afa5fb37bf03", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8179_CWE_200(user):\n return user.__dict__ #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-07123-6176e62fb23a327d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7123_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07123-6176e62fb23a327d", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7123_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "javascript-15005-d230dc5f4fea4c1d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15005CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15005-d230dc5f4fea4c1d", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15005CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-09488-74ec8a2f23fe7781", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9488_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09488-74ec8a2f23fe7781", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9488_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "java-13936-4d84b3b933f44e1e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13936CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13936-4d84b3b933f44e1e", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13936CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-00829-cf69c7205483419a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle829CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00829-cf69c7205483419a", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle829CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-14407-85c87aceb1c4926c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14407_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14407-85c87aceb1c4926c", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14407_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-13685-27a958a11d7c3ecf", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13685CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13685-27a958a11d7c3ecf", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13685CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-03593-537cba4042371a0f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_3593_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03593-537cba4042371a0f", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_3593_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-11240-218c878f0a28f2b1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11240_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11240-218c878f0a28f2b1", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11240_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08706-2965bcd252c11571", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8706CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08706-2965bcd252c11571", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8706CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-10793-e6861285f873fd62", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10793CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10793-e6861285f873fd62", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10793CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09225-17ab4257933f3442", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9225CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09225-17ab4257933f3442", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9225CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-12656-26e0f9f79e9aeb74", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_12656_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12656-26e0f9f79e9aeb74", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_12656_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04892-ce3877b119f445ad", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4892CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04892-ce3877b119f445ad", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4892CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-16630-134742f40bdf146f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_16630_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16630-134742f40bdf146f", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_16630_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-02782-004e784151ffb14a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2782_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02782-004e784151ffb14a", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2782_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "c-02416-37ec3a92aa3b52f8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_2416_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02416-37ec3a92aa3b52f8", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_2416_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-07535-7764c480c1227123", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7535_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07535-7764c480c1227123", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7535_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "cpp-16225-817272e96676ad1a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16225_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16225-817272e96676ad1a", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16225_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02711-b9d8725735a51d5d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2711_CWE_434(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02711-b9d8725735a51d5d", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2711_CWE_434(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-09922-38218ff1cf69f548", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9922_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09922-38218ff1cf69f548", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9922_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "cpp-19315-5cb249aa0a5f393f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19315_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19315-5cb249aa0a5f393f", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19315_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-02955-ec4d9f6778f02b75", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2955CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02955-ec4d9f6778f02b75", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2955CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-01971-2dbf4f9078e5e4ce", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_1971_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01971-2dbf4f9078e5e4ce", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_1971_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-09445-bd4db54bfe5c8b99", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9445CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09445-bd4db54bfe5c8b99", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9445CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-04699-2d6c84353a4b85f5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4699CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04699-2d6c84353a4b85f5", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4699CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-11159-c1c3f8977f3e85a4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_11159_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11159-c1c3f8977f3e85a4", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_11159_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05729-c584c78c909729e3", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5729_CWE_611(xml):\n from lxml import etree\n return etree.fromstring(xml) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05729-c584c78c909729e3", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5729_CWE_611(xml):\n from lxml import etree\n return etree.fromstring(xml) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-17510-b5383cfd444b50c3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17510CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17510-b5383cfd444b50c3", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17510CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-10425-905bd70cd5e7a9f2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10425CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10425-905bd70cd5e7a9f2", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10425CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-06018-5320193d89dca811", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6018CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06018-5320193d89dca811", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6018CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-11038-b4eac34728aafcee", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11038CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11038-b4eac34728aafcee", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11038CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-15427-6840a718b99dd733", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15427_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15427-6840a718b99dd733", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15427_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19986-b80cf5be36170129", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_19986_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19986-b80cf5be36170129", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_19986_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18825-830571c4465b5979", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18825CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18825-830571c4465b5979", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18825CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-14208-2ccc80a164bda00d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14208_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14208-2ccc80a164bda00d", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14208_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-09064-2bae006ce44b6663", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9064_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09064-2bae006ce44b6663", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9064_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "c-10087-964bd6455ae2699d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10087_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10087-964bd6455ae2699d", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10087_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12594-34a2c69e108a9d5c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12594CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12594-34a2c69e108a9d5c", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12594CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04879-fdfce291def9cd3d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4879CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04879-fdfce291def9cd3d", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4879CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-06990-7c11bc6757b3cbd3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_6990_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06990-7c11bc6757b3cbd3", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_6990_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-19454-50f8e1ebf2885a17", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19454_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19454-50f8e1ebf2885a17", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19454_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07617-f0139382c4c01260", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7617CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07617-f0139382c4c01260", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7617CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-03789-02a4779c2893ebf4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3789CWE94(code) {\n return eval(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03789-02a4779c2893ebf4", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3789CWE94(code) {\n return eval(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-08038-4a2489c87231a080", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_8038_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-08038-4a2489c87231a080", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_8038_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "python-15986-75dd29ef0f78d174", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15986_CWE_863(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15986-75dd29ef0f78d174", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15986_CWE_863(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-03919-b687a6a0f66ef3c7", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_3919_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03919-b687a6a0f66ef3c7", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_3919_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-00238-ff6db7aee9efb031", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample238CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00238-ff6db7aee9efb031", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample238CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-13133-4fab9ab7ebe0735d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13133_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13133-4fab9ab7ebe0735d", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13133_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17283-203086218b71ba70", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_17283_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17283-203086218b71ba70", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_17283_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-19962-55e430cf33fdac94", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19962CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19962-55e430cf33fdac94", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19962CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04523-8af353ae5577da92", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4523_CWE_639(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04523-8af353ae5577da92", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4523_CWE_639(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-01010-1f4a4e34da580149", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_1010_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01010-1f4a4e34da580149", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_1010_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-09330-5a6d2d9de5fda078", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9330CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09330-5a6d2d9de5fda078", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9330CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-01207-f1130754e05e175b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1207CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-01207-f1130754e05e175b", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1207CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-09429-40c763f2ba84d790", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_9429_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09429-40c763f2ba84d790", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_9429_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-10609-212afa73e4886342", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10609CWE94(code) {\n return JSON.parse(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10609-212afa73e4886342", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10609CWE94(code) {\n return JSON.parse(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07478-30e0237b8d0cf8f5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7478_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07478-30e0237b8d0cf8f5", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7478_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-01161-e19502eae5a3fa32", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1161_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01161-e19502eae5a3fa32", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1161_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-12443-67feb65a03b92dc8", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12443CWE121(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12443-67feb65a03b92dc8", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12443CWE121(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-07616-948707b1036f77c7", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7616CWE601(next) {\n return next;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07616-948707b1036f77c7", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7616CWE601(next) {\n return next;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-14621-8c1ef33d77319168", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14621CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14621-8c1ef33d77319168", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14621CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-06027-3ba0622ad7719104", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_6027_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06027-3ba0622ad7719104", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_6027_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "python-12533-427eab384be22f1b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12533_CWE_121(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12533-427eab384be22f1b", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12533_CWE_121(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11770-ab51a960bd2ccb45", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11770CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11770-ab51a960bd2ccb45", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11770CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-16581-14e3917e2df8e537", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16581CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16581-14e3917e2df8e537", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16581CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00293-b38a9011c8f7936b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_293_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00293-b38a9011c8f7936b", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_293_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-05084-e357baedeee924aa", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_5084_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05084-e357baedeee924aa", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_5084_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-11021-efe2d438ac77ef61", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11021CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11021-efe2d438ac77ef61", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11021CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-03995-b4ac3bdb26305867", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3995_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03995-b4ac3bdb26305867", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3995_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-06240-565becc6b4455495", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6240CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06240-565becc6b4455495", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6240CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-01337-d5138fa6fde24cde", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1337CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01337-d5138fa6fde24cde", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1337CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-04588-98f721b3cdd25577", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4588CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04588-98f721b3cdd25577", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4588CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-06747-b9a8f123dd5dfa18", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6747_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06747-b9a8f123dd5dfa18", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6747_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-18586-2fd6e768046d9cc5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18586CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18586-2fd6e768046d9cc5", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18586CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04604-8687e518e312295d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_4604_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04604-8687e518e312295d", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_4604_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-12537-fd9517d757a3edca", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12537CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12537-fd9517d757a3edca", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12537CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00835-207b368a513e46f2", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_835_CWE_190(int count) {\n int bytes = count * 88;\n int bytes = count * 88;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00835-207b368a513e46f2", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_835_CWE_190(int count) {\n int bytes = count * 88;\n int bytes = count * 88;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "python-06715-874b956a0176884c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6715_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06715-874b956a0176884c", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6715_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-07683-9b4f310e4b0cbd23", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7683CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07683-9b4f310e4b0cbd23", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7683CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-19179-c2d3904ebdbff791", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_19179_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19179-c2d3904ebdbff791", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_19179_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07361-95a242529243d805", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7361_CWE_434(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07361-95a242529243d805", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7361_CWE_434(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-05041-5513a5f3d05d15f0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5041CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05041-5513a5f3d05d15f0", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5041CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-09158-936a64cb148529ee", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9158CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09158-936a64cb148529ee", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9158CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-06913-550bd2f9075f5048", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6913_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06913-550bd2f9075f5048", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6913_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "javascript-17689-341ba12efd439f8c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17689CWE94(code) {\n return JSON.parse(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17689-341ba12efd439f8c", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17689CWE94(code) {\n return JSON.parse(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-07007-c0ac99ff3b99f485", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7007CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07007-c0ac99ff3b99f485", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7007CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-11025-eb8fc1a62e497acf", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11025CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11025-eb8fc1a62e497acf", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11025CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-11915-9b46627b3d3f4592", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11915CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11915-9b46627b3d3f4592", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11915CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08579-0ef7435e3f295fe6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8579CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08579-0ef7435e3f295fe6", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8579CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-01242-442aa478847e3075", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_1242_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01242-442aa478847e3075", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_1242_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "javascript-13455-fe9890d48946df0f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13455CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13455-fe9890d48946df0f", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13455CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05160-1f89af9b6da377de", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5160_CWE_79(name):\n import html\n return '

' + name + '

' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05160-1f89af9b6da377de", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5160_CWE_79(name):\n import html\n return '

' + name + '

' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-03676-582e03c6ae23bfa8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_3676_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03676-582e03c6ae23bfa8", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_3676_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-13842-267ce9d94724704e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_13842_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13842-267ce9d94724704e", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_13842_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11368-8bae78673553a9b2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11368CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11368-8bae78673553a9b2", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11368CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-17239-a5c67af2cafb6c3e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17239CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17239-a5c67af2cafb6c3e", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17239CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08242-2aa892d51c45b372", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8242CWE77(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08242-2aa892d51c45b372", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8242CWE77(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-13214-403fe01e525ba134", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13214_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13214-403fe01e525ba134", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13214_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05559-2cdbe03bde332e0b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5559_CWE_94(expr):\n import ast\n return eval(expr) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05559-2cdbe03bde332e0b", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5559_CWE_94(expr):\n import ast\n return eval(expr) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-04356-a9d50a39153d4dba", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4356CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04356-a9d50a39153d4dba", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4356CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-12070-952ed87e213ae4ab", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12070_CWE_79(name):\n import html\n return '

' + html.escape(name) + '

'\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12070-952ed87e213ae4ab", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12070_CWE_79(name):\n import html\n return '

' + html.escape(name) + '

'\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-09926-4684d9377fdda903", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9926CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next;\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09926-4684d9377fdda903", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9926CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next;\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-07630-ab6fa9f348e2771b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7630CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07630-ab6fa9f348e2771b", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7630CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-00645-719116a8702837e9", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_645_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00645-719116a8702837e9", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_645_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-09732-bda6d08a24820146", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9732_CWE_476(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09732-bda6d08a24820146", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9732_CWE_476(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-08945-25e11f04d9ce0dcc", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8945_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08945-25e11f04d9ce0dcc", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8945_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-03860-3dd1f29c92a6f0f1", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3860CWE306(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03860-3dd1f29c92a6f0f1", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3860CWE306(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-07992-b47a58cd2b839a78", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7992CWE476(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07992-b47a58cd2b839a78", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7992CWE476(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-02874-90587b698616a7c1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_2874_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02874-90587b698616a7c1", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_2874_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-16093-d1c642cc0f267ce6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16093CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16093-d1c642cc0f267ce6", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16093CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08223-cf8ea1a1775e01ac", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_8223_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08223-cf8ea1a1775e01ac", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_8223_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-19590-5f73c85f567d3d18", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19590CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19590-5f73c85f567d3d18", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19590CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-10954-d0903741ce88f58c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_10954_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10954-d0903741ce88f58c", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_10954_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13326-2b75a12e923391a7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_13326_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13326-2b75a12e923391a7", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_13326_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-06659-d45565c1e2e3933f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6659CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06659-d45565c1e2e3933f", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6659CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-07965-ba6ae2b2c0d4d772", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7965_CWE_122(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07965-ba6ae2b2c0d4d772", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7965_CWE_122(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-05950-c118a1cfbeab2a7b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5950_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05950-c118a1cfbeab2a7b", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5950_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "javascript-15218-9d638e69767cb3ac", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15218CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15218-9d638e69767cb3ac", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15218CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12699-391a04572b024475", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_12699_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12699-391a04572b024475", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_12699_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-06656-5180d38c12683dd2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6656CWE601(next) {\n return next;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06656-5180d38c12683dd2", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6656CWE601(next) {\n return next;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-13523-231ccf534fa608ca", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13523CWE121(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13523-231ccf534fa608ca", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13523CWE121(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05150-c6b25e7f027b28b1", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5150CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05150-c6b25e7f027b28b1", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5150CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-03620-4fafeee4ea8bd7ca", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3620CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03620-4fafeee4ea8bd7ca", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3620CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-03276-510f9a81f86fc2c3", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3276_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03276-510f9a81f86fc2c3", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3276_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-16926-83a4599bf62a7414", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16926CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16926-83a4599bf62a7414", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16926CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02252-96572f8e61742af8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2252_CWE_352(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02252-96572f8e61742af8", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2252_CWE_352(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-15468-23666e13f5fedf53", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15468CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15468-23666e13f5fedf53", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15468CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17775-b5d4004701a4c6e2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17775CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17775-b5d4004701a4c6e2", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17775CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16930-e60fa3ca633322d1", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16930CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16930-e60fa3ca633322d1", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16930CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08344-2eb6415c7133323c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8344_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08344-2eb6415c7133323c", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8344_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "java-04998-6eb65997920687ef", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4998CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04998-6eb65997920687ef", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4998CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-01077-071704e66db9a723", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1077CWE798() {\n return 'hardcoded-token';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-01077-071704e66db9a723", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1077CWE798() {\n return 'hardcoded-token';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-13063-c9152f9cb4c38ab1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_13063_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13063-c9152f9cb4c38ab1", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_13063_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-14791-5f48b8c42211b851", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14791_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return None if host not in {'api.example.com'} else requests.get(url, timeout=2)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14791-5f48b8c42211b851", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14791_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return None if host not in {'api.example.com'} else requests.get(url, timeout=2)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15535-12ac1820596b1e99", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15535CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15535-12ac1820596b1e99", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15535CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-14940-eb37f931f23fa975", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14940_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14940-eb37f931f23fa975", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14940_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02496-4d8674993f4de907", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2496_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02496-4d8674993f4de907", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2496_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "java-04518-1e22a382bae4a02b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4518CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04518-1e22a382bae4a02b", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4518CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-13791-79a2aa837efe1369", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13791CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13791-79a2aa837efe1369", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13791CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-06119-c13110ec94960dc7", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6119CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06119-c13110ec94960dc7", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6119CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-07416-5a8c405127b6b87b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7416_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07416-5a8c405127b6b87b", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7416_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "python-16177-88897b148406f3b4", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16177_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16177-88897b148406f3b4", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16177_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17018-e9c9041850954c6c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17018_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17018-e9c9041850954c6c", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17018_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-08630-933e1a6f0228b9c2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_8630_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-08630-933e1a6f0228b9c2", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_8630_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-02060-368bda82b8c4821f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_2060_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02060-368bda82b8c4821f", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_2060_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-06372-b6425a798b5195eb", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6372CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06372-b6425a798b5195eb", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6372CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-06155-fd918aee949d2a9a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6155CWE22(name) {\n return fs.readFileSync('/srv/data/' + name);\n return fs.readFileSync('/srv/data/' + name);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06155-fd918aee949d2a9a", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6155CWE22(name) {\n return fs.readFileSync('/srv/data/' + name);\n return fs.readFileSync('/srv/data/' + name);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-09552-e96148e1b756b951", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_9552_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09552-e96148e1b756b951", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_9552_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "javascript-14911-fb17f4050643cc34", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14911CWE918(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14911-fb17f4050643cc34", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14911CWE918(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02367-5e0c4081bfa0b352", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2367_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02367-5e0c4081bfa0b352", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2367_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-07190-7b53b63b61d37bd5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7190CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07190-7b53b63b61d37bd5", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7190CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-08984-8836d7e1101d697e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8984CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08984-8836d7e1101d697e", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8984CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-04303-c09f0ebd139decc6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4303CWE121(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04303-c09f0ebd139decc6", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4303CWE121(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-18228-724f349d9d3e5db4", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18228_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18228-724f349d9d3e5db4", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18228_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-14771-c38b642bef0c75c0", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14771CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14771-c38b642bef0c75c0", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14771CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-06263-d3218370c2beab2c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6263CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06263-d3218370c2beab2c", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6263CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-12996-9dacc75e96518292", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12996_CWE_601(next_url):\n return '/home' if not next_url.startswith('/') else next_url\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12996-9dacc75e96518292", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12996_CWE_601(next_url):\n return '/home' if not next_url.startswith('/') else next_url\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05113-4f2aa9f1d4fc6d51", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5113CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05113-4f2aa9f1d4fc6d51", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5113CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-17172-1f3188493b5b315e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17172CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17172-1f3188493b5b315e", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17172CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-16179-4644a10625393a0d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16179_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16179-4644a10625393a0d", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16179_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02461-1b0ff05387243e52", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2461_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02461-1b0ff05387243e52", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2461_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-13598-919a58deefd54b3e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13598CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13598-919a58deefd54b3e", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13598CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-16710-92a291a21b46825b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_16710_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16710-92a291a21b46825b", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_16710_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-03827-264274f76c89bdee", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_3827_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03827-264274f76c89bdee", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_3827_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-11907-ecc660114787ac17", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11907CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11907-ecc660114787ac17", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11907CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-10245-67217b0bb2e25211", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10245_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10245-67217b0bb2e25211", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10245_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-06107-53d57ba4c578d49f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6107CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06107-53d57ba4c578d49f", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6107CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-16108-0105dd2cc84f5a4f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16108CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16108-0105dd2cc84f5a4f", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16108CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17854-f170b7921ef0e193", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_17854_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17854-f170b7921ef0e193", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_17854_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12113-3ffe64f8ff5c971b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12113_CWE_121(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12113-3ffe64f8ff5c971b", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12113_CWE_121(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-08027-773514df27f3c02a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8027_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08027-773514df27f3c02a", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8027_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-03032-a5233da5b9b640ee", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3032CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03032-a5233da5b9b640ee", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3032CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-03633-582a5e8ff5c10c7f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3633_CWE_862(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03633-582a5e8ff5c10c7f", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3633_CWE_862(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-07415-c3cbd32402e2d92f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7415CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07415-c3cbd32402e2d92f", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7415CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-04698-538232b70deddd39", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_4698_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04698-538232b70deddd39", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_4698_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-00676-3650c549b4f73089", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_676_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00676-3650c549b4f73089", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_676_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-14153-1b7b272b38b22f20", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14153_CWE_121(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14153-1b7b272b38b22f20", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14153_CWE_121(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01678-8ca81478b6fff1c0", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1678_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01678-8ca81478b6fff1c0", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1678_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "c-03616-2a203dda6d8716b0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_3616_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03616-2a203dda6d8716b0", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_3616_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-15559-2ac9ddc98590e786", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_15559_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15559-2ac9ddc98590e786", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_15559_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03866-7d9305d02cd05f98", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3866_CWE_601(next_url):\n return next_url #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03866-7d9305d02cd05f98", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3866_CWE_601(next_url):\n return next_url #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-15996-87c71367492967f6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15996CWE601(next) {\n return next.startsWith('/') ? next : '/';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15996-87c71367492967f6", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15996CWE601(next) {\n return next.startsWith('/') ? next : '/';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-13611-396c4a285351460e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_13611_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13611-396c4a285351460e", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_13611_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-13362-aa9d0ad584beb468", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13362CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13362-aa9d0ad584beb468", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13362CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-06502-a91f5b249a32858f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6502_CWE_77(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06502-a91f5b249a32858f", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6502_CWE_77(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-00239-fbedb878556dc438", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_239_CWE_611(xml):\n from lxml import etree\n return etree.fromstring(xml) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00239-fbedb878556dc438", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_239_CWE_611(xml):\n from lxml import etree\n return etree.fromstring(xml) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-09735-e4199e031af9bcd2", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9735_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09735-e4199e031af9bcd2", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9735_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "c-03817-c6e26872606e54ba", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_3817_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03817-c6e26872606e54ba", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_3817_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "c-03440-dc43830d0b95dfe8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_3440_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03440-dc43830d0b95dfe8", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_3440_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-03402-76f99a5af45b9784", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_3402_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03402-76f99a5af45b9784", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_3402_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-19221-d2b9d6685bdb3bd3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19221CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19221-d2b9d6685bdb3bd3", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19221CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-00048-3127743de7eb657d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_48_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00048-3127743de7eb657d", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_48_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-03628-6f34753127afcc09", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3628_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03628-6f34753127afcc09", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3628_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-08159-8bf17cc1dc33b31b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8159CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08159-8bf17cc1dc33b31b", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8159CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-13650-c385c641d7ee57ad", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13650CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13650-c385c641d7ee57ad", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13650CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-01177-4f77b8bb7db3a301", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1177_CWE_125(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01177-4f77b8bb7db3a301", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1177_CWE_125(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-11138-dc8f23941842108d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11138CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11138-dc8f23941842108d", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11138CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-08965-5dd4ae38a613f2a4", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8965_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08965-5dd4ae38a613f2a4", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8965_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-04421-564b63d12ec78abc", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4421_CWE_434(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04421-564b63d12ec78abc", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4421_CWE_434(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-19734-269987e6a501b203", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_19734_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19734-269987e6a501b203", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_19734_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-14354-051af8a10df6bb4f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_14354_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14354-051af8a10df6bb4f", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_14354_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-13022-5f5ecd5db84f0002", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13022_CWE_77(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13022-5f5ecd5db84f0002", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13022_CWE_77(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-06681-89ba9000497820ef", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6681CWE918(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06681-89ba9000497820ef", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6681CWE918(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-04004-692c9993253b7845", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4004CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04004-692c9993253b7845", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4004CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-07514-d1ba8577ede19f62", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_7514_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07514-d1ba8577ede19f62", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_7514_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-07157-fe45627cbb39fd1c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7157CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07157-fe45627cbb39fd1c", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7157CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-17828-12a9f1b44f21febb", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17828_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17828-12a9f1b44f21febb", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17828_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-02911-246d9593c5cf764d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2911CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02911-246d9593c5cf764d", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2911CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-18392-e79a71b65182226c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18392_CWE_77(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18392-e79a71b65182226c", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18392_CWE_77(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-11568-f5a7f3600373a8df", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11568_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11568-f5a7f3600373a8df", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11568_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13760-40c44167c2e13764", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13760CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13760-40c44167c2e13764", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13760CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-16335-f42fd49de18517cc", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16335_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16335-f42fd49de18517cc", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16335_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11684-b1bcfdc5baa74ab9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11684CWE787(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11684-b1bcfdc5baa74ab9", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11684CWE787(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19101-659e500e489747ee", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_19101_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19101-659e500e489747ee", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_19101_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-19949-2b232f7e6aa6c770", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19949_CWE_200(user):\n return {'id': user.id}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19949-2b232f7e6aa6c770", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19949_CWE_200(user):\n return {'id': user.id}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11697-e337601b1b919180", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11697CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11697-e337601b1b919180", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11697CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04685-dadceb62c647fd88", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4685CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04685-dadceb62c647fd88", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4685CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-19441-11eb0a37ffd810bf", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19441CWE918(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19441-11eb0a37ffd810bf", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19441CWE918(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02528-1e5fca7d910b50ce", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2528_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02528-1e5fca7d910b50ce", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2528_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-01165-cd9bcad46d9b710f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_1165_CWE_190(int count) {\n int bytes = count * 76;\n int bytes = count * 76;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01165-cd9bcad46d9b710f", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_1165_CWE_190(int count) {\n int bytes = count * 76;\n int bytes = count * 76;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "python-18015-64cbec50e9a543df", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18015_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return p if str(p).startswith(str(Path(base).resolve())) else None\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18015-64cbec50e9a543df", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18015_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return p if str(p).startswith(str(Path(base).resolve())) else None\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15329-26ef765245362ac0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15329CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15329-26ef765245362ac0", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15329CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-14463-85e467be9768c9c6", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_14463_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14463-85e467be9768c9c6", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_14463_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-15228-e2ebf017deaba295", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15228_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15228-e2ebf017deaba295", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15228_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-14143-681fdc5b28401c14", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14143CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14143-681fdc5b28401c14", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14143CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-14440-afcec8c2292a64ef", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_14440_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14440-afcec8c2292a64ef", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_14440_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04212-ff2767fac62a6e38", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4212_CWE_476(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04212-ff2767fac62a6e38", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4212_CWE_476(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-08214-8a02586dd1ee6801", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8214CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08214-8a02586dd1ee6801", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8214CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-14484-aff3e6ddab2246c3", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14484CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14484-aff3e6ddab2246c3", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14484CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01423-ecbd1f8de34d6aeb", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1423_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01423-ecbd1f8de34d6aeb", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1423_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "c-15053-81a57b5a7a86dd2b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_15053_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15053-81a57b5a7a86dd2b", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_15053_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-16849-a29964a9aa07421b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_16849_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16849-a29964a9aa07421b", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_16849_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-05805-dce43438d5fb9d58", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5805CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05805-dce43438d5fb9d58", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5805CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-14120-17edfc88d61c9c8c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_14120_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14120-17edfc88d61c9c8c", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_14120_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19525-3f5afe322e5dca72", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19525_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19525-3f5afe322e5dca72", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19525_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-14137-dd8a9ff9d4be5783", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14137CWE798() {\n return process.env.API_TOKEN;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14137-dd8a9ff9d4be5783", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14137CWE798() {\n return process.env.API_TOKEN;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04281-5397d33fef68aa06", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_4281_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04281-5397d33fef68aa06", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_4281_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-16179-a5cde3d2adb488d4", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16179_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16179-a5cde3d2adb488d4", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16179_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-10471-24c2db79264a91e2", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_10471_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10471-24c2db79264a91e2", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_10471_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-10278-deab680489a20bfa", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10278CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10278-deab680489a20bfa", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10278CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-09112-276d35153fc48d00", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9112_CWE_77(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09112-276d35153fc48d00", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9112_CWE_77(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-12611-3435d8ee3b810b49", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_12611_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12611-3435d8ee3b810b49", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_12611_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-00084-dadfde62317b6980", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle84CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00084-dadfde62317b6980", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle84CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-18559-c2bb3b4642943528", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18559CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18559-c2bb3b4642943528", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18559CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-11216-2c1981e73db7066d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11216CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11216-2c1981e73db7066d", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11216CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-05461-5dcdd6f7682dc316", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_5461_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05461-5dcdd6f7682dc316", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_5461_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-16749-1887b71f7df74fd8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_16749_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16749-1887b71f7df74fd8", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_16749_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-17884-89ba99939528d0bc", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_17884_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17884-89ba99939528d0bc", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_17884_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-17378-5e3165e968c1e415", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17378_CWE_295(url):\n import requests\n return requests.get(url, timeout=2)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17378-5e3165e968c1e415", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17378_CWE_295(url):\n import requests\n return requests.get(url, timeout=2)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-09042-ac05267699b5cb1d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9042CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09042-ac05267699b5cb1d", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9042CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-16389-2cee5cc3382c97e6", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_16389_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16389-2cee5cc3382c97e6", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_16389_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-10582-0e0643709db7e55a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10582_CWE_476(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10582-0e0643709db7e55a", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10582_CWE_476(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-02423-e1cc3532fe368a1a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2423CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02423-e1cc3532fe368a1a", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2423CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-08385-02e0d4bdea1388a9", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8385_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08385-02e0d4bdea1388a9", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8385_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-17467-1660ca4e45b74786", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17467_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17467-1660ca4e45b74786", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17467_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07249-1ea550845f05a0b1", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7249CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07249-1ea550845f05a0b1", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7249CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-02406-8d0c95e00988409d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2406CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02406-8d0c95e00988409d", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2406CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-04046-039b3e0d4ef47d9f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4046CWE601(next) {\n return next;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04046-039b3e0d4ef47d9f", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4046CWE601(next) {\n return next;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-18836-cb83c343ca60fd26", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_18836_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18836-cb83c343ca60fd26", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_18836_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09028-b331340c1d53438a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9028CWE915(target, body) {\n return Object.assign(target, body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09028-b331340c1d53438a", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9028CWE915(target, body) {\n return Object.assign(target, body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-18030-28d9830efaf9ecec", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18030CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18030-28d9830efaf9ecec", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18030CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07761-9aeff4b189506a1d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7761CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07761-9aeff4b189506a1d", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7761CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-13173-230f8fd256e6ba60", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_13173_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13173-230f8fd256e6ba60", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_13173_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16023-b2a755215f277f1b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16023CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16023-b2a755215f277f1b", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16023CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-11164-23745b2d3dac7753", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11164_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11164-23745b2d3dac7753", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11164_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05326-11c49f09071cf6ec", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5326_CWE_863(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05326-11c49f09071cf6ec", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5326_CWE_863(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-03290-ffe117c2a2657c90", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_3290_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03290-ffe117c2a2657c90", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_3290_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-03087-a02e6faaf1619534", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3087CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03087-a02e6faaf1619534", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3087CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-09295-110894e0b3b1c9d1", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9295CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09295-110894e0b3b1c9d1", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9295CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-19854-13a5dfbdca954001", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19854CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19854-13a5dfbdca954001", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19854CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17631-4727a066573f2efd", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17631CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17631-4727a066573f2efd", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17631CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08766-a9e730d6006fa468", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8766_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08766-a9e730d6006fa468", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8766_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-03837-2f501e48260d38d2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3837CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03837-2f501e48260d38d2", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3837CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-16382-d5d3264f149d3556", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16382_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16382-d5d3264f149d3556", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16382_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13503-5bcc73fd6eec6ccb", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13503CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13503-5bcc73fd6eec6ccb", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13503CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02528-f03328a540e314fb", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2528_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02528-f03328a540e314fb", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2528_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "java-17974-71e3cb6b3dedd8c4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17974CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17974-71e3cb6b3dedd8c4", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17974CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-12344-772338a27b3804fa", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12344_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12344-772338a27b3804fa", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12344_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-10200-717660243b2e27f5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_10200_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10200-717660243b2e27f5", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_10200_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-15770-d68155f81b7c578f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15770_CWE_120(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15770-d68155f81b7c578f", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15770_CWE_120(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12629-7d84f5b9c0381bff", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12629_CWE_200(user):\n return {'id': user.id}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12629-7d84f5b9c0381bff", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12629_CWE_200(user):\n return {'id': user.id}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-05820-fd8eba06404ff168", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_5820_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05820-fd8eba06404ff168", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_5820_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-00319-f436e9ce2b948ddb", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_319_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00319-f436e9ce2b948ddb", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_319_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-15480-c69b9c503403eb97", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_15480_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15480-c69b9c503403eb97", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_15480_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-09402-7acdf6f73d03b301", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_9402_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09402-7acdf6f73d03b301", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_9402_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "javascript-19817-f449ead9ec82e5c4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19817CWE125(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19817-f449ead9ec82e5c4", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19817CWE125(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19303-a086abe795c67598", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_19303_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19303-a086abe795c67598", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_19303_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13345-1bd95fc016304576", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13345_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13345-1bd95fc016304576", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13345_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-11540-0e1ed9911823b82d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11540_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11540-0e1ed9911823b82d", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11540_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-15104-987bc767df1f0f16", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15104_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15104-987bc767df1f0f16", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15104_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07967-0701748a15504c92", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7967CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07967-0701748a15504c92", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7967CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-10185-6dde8b98f2ad26e3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10185CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10185-6dde8b98f2ad26e3", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10185CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02288-914103fa938f2505", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2288_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02288-914103fa938f2505", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2288_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-09813-fba84f102370fe8e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9813CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09813-fba84f102370fe8e", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9813CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-02080-9693031edf5248f1", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2080CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02080-9693031edf5248f1", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2080CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-19961-6c4960286ec44732", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_19961_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19961-6c4960286ec44732", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_19961_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-10315-0c729134ef404174", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_10315_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10315-0c729134ef404174", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_10315_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-17641-a7f4eb3b04395ea7", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17641CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17641-a7f4eb3b04395ea7", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17641CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-01472-46fc2cdbeed6f821", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1472CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01472-46fc2cdbeed6f821", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1472CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-03857-f26556a4cdc4009d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3857CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03857-f26556a4cdc4009d", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3857CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-06349-237f25440d5684a9", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_6349_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06349-237f25440d5684a9", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_6349_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-02274-5e186feba17abfd8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_2274_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02274-5e186feba17abfd8", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_2274_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-17086-a09fc709c23c233d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17086CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17086-a09fc709c23c233d", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17086CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-11016-948e056f1a7820e0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11016_CWE_601(next_url):\n return '/home' if not next_url.startswith('/') else next_url\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11016-948e056f1a7820e0", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11016_CWE_601(next_url):\n return '/home' if not next_url.startswith('/') else next_url\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-04686-9f7a7f0ca330ebf2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_4686_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04686-9f7a7f0ca330ebf2", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_4686_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "c-07158-70164b6313abc4c1", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_7158_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07158-70164b6313abc4c1", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_7158_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-17798-30f5de525c07a45d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17798CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17798-30f5de525c07a45d", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17798CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-09233-e3f750d41558eb41", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_9233_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09233-e3f750d41558eb41", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_9233_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-07008-d5fc7ecca1a75fdb", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7008_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07008-d5fc7ecca1a75fdb", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7008_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-05044-387150b29e2c6a9a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5044CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05044-387150b29e2c6a9a", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5044CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-01445-65dc01b05232681f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1445CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01445-65dc01b05232681f", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1445CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-04939-52b2f65efc26b143", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_4939_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04939-52b2f65efc26b143", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_4939_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-09497-efc7f25cae2bb952", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9497CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09497-efc7f25cae2bb952", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9497CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-04094-e9500d724b312607", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4094CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04094-e9500d724b312607", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4094CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-07588-c9ab03f1eda9cfd1", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7588_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07588-c9ab03f1eda9cfd1", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7588_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "python-08311-d5c32b50772ff7d8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8311_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08311-d5c32b50772ff7d8", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8311_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-16128-4a62e6a53374d0e7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16128_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16128-4a62e6a53374d0e7", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16128_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-09063-d753634d0e55b853", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_9063_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09063-d753634d0e55b853", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_9063_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-03331-a1fcb577de96c042", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_3331_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03331-a1fcb577de96c042", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_3331_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-06399-d3d9d5bd2081acaf", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6399CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06399-d3d9d5bd2081acaf", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6399CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-08400-f3b882b299f88aae", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8400CWE79(name) {\n return `

${name}

`;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08400-f3b882b299f88aae", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8400CWE79(name) {\n return `

${name}

`;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-06245-fb45497e6d091e2d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6245_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06245-fb45497e6d091e2d", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6245_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "java-02014-8c907c552377a34b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2014CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02014-8c907c552377a34b", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2014CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-09476-0054d0fb810e246e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9476CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next;\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09476-0054d0fb810e246e", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9476CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next;\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-14624-33dcbe9b82b7cc22", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14624_CWE_787(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14624-33dcbe9b82b7cc22", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14624_CWE_787(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12807-616d101539a8faab", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12807_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12807-616d101539a8faab", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12807_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09399-0690dae007fa0fe4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9399CWE94(code) {\n return eval(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09399-0690dae007fa0fe4", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9399CWE94(code) {\n return eval(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-00429-90f9e966e8136305", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_429_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00429-90f9e966e8136305", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_429_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-07836-abed3435b1a6cd70", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7836_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07836-abed3435b1a6cd70", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7836_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "cpp-11633-5ceaff157d69fadf", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11633_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11633-5ceaff157d69fadf", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11633_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-09312-5b345c2f3711703d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_9312_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09312-5b345c2f3711703d", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_9312_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "cpp-07190-16c2badba42f1a79", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_7190_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07190-16c2badba42f1a79", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_7190_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-13479-7342f68ee63d6cfc", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13479_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13479-7342f68ee63d6cfc", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13479_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-00223-73ad6bacc7db900f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample223CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00223-73ad6bacc7db900f", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample223CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-09952-44a9cae63ca310e3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9952_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09952-44a9cae63ca310e3", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9952_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-04477-6f18cc11069a0dc9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4477CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04477-6f18cc11069a0dc9", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4477CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-02273-048719582c30e538", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_2273_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02273-048719582c30e538", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_2273_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-04620-3ba21b29954d48d9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4620CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04620-3ba21b29954d48d9", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4620CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-01559-0db30865a3c07c65", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1559_CWE_590() {\n char local[8];\n local[0] = 0;\n free(local);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-590\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01559-0db30865a3c07c65", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1559_CWE_590() {\n char local[8];\n local[0] = 0;\n free(local);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-590\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-05138-adbf1733294553a1", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5138_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05138-adbf1733294553a1", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5138_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-09283-2c387789af33f2ad", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9283_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09283-2c387789af33f2ad", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9283_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "c-01487-64f7201294361a8b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_1487_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01487-64f7201294361a8b", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_1487_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-03663-6d428dc51e283c83", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3663CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03663-6d428dc51e283c83", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3663CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-14675-58ef400d44ad136f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14675CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14675-58ef400d44ad136f", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14675CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-17063-09a41cff4442b0c4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17063_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17063-09a41cff4442b0c4", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17063_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-18398-6ed1f7b274620f0b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18398CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18398-6ed1f7b274620f0b", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18398CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01915-79a57c5276f21692", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_1915_CWE_190(int count) {\n int bytes = count * 77;\n int bytes = count * 77;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01915-79a57c5276f21692", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_1915_CWE_190(int count) {\n int bytes = count * 77;\n int bytes = count * 77;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-14827-3f740e497f097a7f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14827_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14827-3f740e497f097a7f", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14827_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18844-4e01659b5ff81c10", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18844CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18844-4e01659b5ff81c10", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18844CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-17737-efc998cc1105a581", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17737_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17737-efc998cc1105a581", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17737_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-01449-0aa7b979e6995a5c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1449_CWE_94(expr):\n import ast\n return eval(expr) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01449-0aa7b979e6995a5c", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1449_CWE_94(expr):\n import ast\n return eval(expr) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-02800-5d24fb3db21cfbea", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2800CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02800-5d24fb3db21cfbea", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2800CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-13756-3289b53dabd76181", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13756_CWE_416(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13756-3289b53dabd76181", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13756_CWE_416(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-00575-210095130d96c0e9", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_575_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00575-210095130d96c0e9", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_575_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-02339-bc361bf1ccfa3f52", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2339_CWE_590() {\n char local[8];\n local[0] = 0;\n free(local);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-590\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02339-bc361bf1ccfa3f52", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2339_CWE_590() {\n char local[8];\n local[0] = 0;\n free(local);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-590\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "c-12436-555b216e194f9b1d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12436_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12436-555b216e194f9b1d", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12436_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-18042-f88d87724855cf91", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_18042_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18042-f88d87724855cf91", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_18042_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15754-ad94b88a9902614c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15754CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15754-ad94b88a9902614c", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15754CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-13043-493d58fa54d9e249", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13043CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13043-493d58fa54d9e249", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13043CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08085-e0d9ff9059fbbd0c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8085_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08085-e0d9ff9059fbbd0c", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8085_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-19434-9808f96ae786511e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19434_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19434-9808f96ae786511e", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19434_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-04791-a2f5f2a11355eea0", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4791CWE918(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04791-a2f5f2a11355eea0", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4791CWE918(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-00700-d0163b459c2302c2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle700CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00700-d0163b459c2302c2", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle700CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-03160-676c716c1a55d742", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3160_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03160-676c716c1a55d742", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3160_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "javascript-06001-c18c07e4cf06b2c4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6001CWE89(db, id) {\n return db.query('select * from users where id = ' + id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06001-c18c07e4cf06b2c4", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6001CWE89(db, id) {\n return db.query('select * from users where id = ' + id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-16243-4c9f5d8ab60f5c5f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_16243_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16243-4c9f5d8ab60f5c5f", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_16243_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07067-11371c2bce4dce2a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7067CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07067-11371c2bce4dce2a", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7067CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-10757-5639e98fedfd3f73", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_10757_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10757-5639e98fedfd3f73", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_10757_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-10326-833e48178560ea0a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_10326_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10326-833e48178560ea0a", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_10326_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-18456-7e48b188d5c3156d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18456CWE601(next) {\n return next.startsWith('/') ? next : '/';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18456-7e48b188d5c3156d", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18456CWE601(next) {\n return next.startsWith('/') ? next : '/';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04860-0ac6715e1b869937", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4860_CWE_79(name):\n import html\n return '

' + name + '

' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04860-0ac6715e1b869937", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4860_CWE_79(name):\n import html\n return '

' + name + '

' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-08131-0655538074695bce", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8131_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08131-0655538074695bce", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8131_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-12211-b5941b27977d28cd", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12211_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return None if host not in {'api.example.com'} else requests.get(url, timeout=2)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12211-b5941b27977d28cd", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12211_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return None if host not in {'api.example.com'} else requests.get(url, timeout=2)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13312-b549d53c05c80a8b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_13312_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13312-b549d53c05c80a8b", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_13312_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-11161-bb7203fec29bb5e0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11161CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11161-bb7203fec29bb5e0", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11161CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12655-6c47a30146616e3b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12655_CWE_122(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12655-6c47a30146616e3b", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12655_CWE_122(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-02069-68081ee48640f6b0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2069CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02069-68081ee48640f6b0", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2069CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-10102-212d46e431848752", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10102CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10102-212d46e431848752", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10102CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05814-09cd7a99ee619662", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5814_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05814-09cd7a99ee619662", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5814_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-15921-8d090b966665a089", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15921_CWE_434(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15921-8d090b966665a089", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15921_CWE_434(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18199-d054089cb3f28771", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18199CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18199-d054089cb3f28771", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18199CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-06697-cc68db4aa3707a83", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_6697_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06697-cc68db4aa3707a83", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_6697_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "java-15145-2ccd6fee4ac04bb9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15145CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15145-2ccd6fee4ac04bb9", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15145CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07531-a17a47793e3b3542", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_7531_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07531-a17a47793e3b3542", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_7531_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-01929-7e3eb8e8307f9de8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1929CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01929-7e3eb8e8307f9de8", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1929CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-13813-8746d91cb2065ad4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13813CWE862(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13813-8746d91cb2065ad4", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13813CWE862(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05829-43ad5e47aa1f1768", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5829CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05829-43ad5e47aa1f1768", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5829CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-02869-f6ed2c7d14d462a6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2869CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02869-f6ed2c7d14d462a6", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2869CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-10057-ae4aaeb83b3098b2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_10057_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10057-ae4aaeb83b3098b2", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_10057_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-17300-a5258ba725dc5ff2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17300CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17300-a5258ba725dc5ff2", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17300CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12237-8961ad4c29d30244", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12237_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12237-8961ad4c29d30244", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12237_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-18633-b9d4571478ce668f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_18633_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18633-b9d4571478ce668f", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_18633_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-10496-45e5087222e95ca2", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_10496_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10496-45e5087222e95ca2", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_10496_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-06692-4c0d26221cd4b452", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_6692_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06692-4c0d26221cd4b452", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_6692_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-14291-856db829548b55b0", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14291CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14291-856db829548b55b0", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14291CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-01495-a5f773ae0a2448b8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1495CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01495-a5f773ae0a2448b8", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1495CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-04667-6c121a55ea40f5e2", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4667_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04667-6c121a55ea40f5e2", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4667_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-15131-70b2aad49e183c66", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_15131_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15131-70b2aad49e183c66", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_15131_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17715-b296d67ab718261e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17715_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17715-b296d67ab718261e", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17715_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19756-95dfa82849ae4469", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19756_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19756-95dfa82849ae4469", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19756_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04057-0cda7de0a56f50e4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4057CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04057-0cda7de0a56f50e4", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4057CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-06716-0bb7e4b5dd21a4a6", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_6716_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06716-0bb7e4b5dd21a4a6", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_6716_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "javascript-17504-773ba9b93ec3c52e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17504CWE787(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17504-773ba9b93ec3c52e", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17504CWE787(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-00009-ed11ee0cddf690a6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9CWE94(code) {\n return eval(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00009-ed11ee0cddf690a6", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9CWE94(code) {\n return eval(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-11324-8777a8207202cfb6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11324CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11324-8777a8207202cfb6", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11324CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-18612-adbe556bf840585e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18612_CWE_352(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18612-adbe556bf840585e", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18612_CWE_352(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-00413-904e0d400b5e443f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_413_CWE_639(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00413-904e0d400b5e443f", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_413_CWE_639(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-11846-b92adffb340e3b40", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11846CWE863(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11846-b92adffb340e3b40", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11846CWE863(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-01403-489eb22a3656d56c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1403CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01403-489eb22a3656d56c", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1403CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-09827-b2ca406f3df73932", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_9827_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09827-b2ca406f3df73932", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_9827_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-13655-476c54dc09b043cc", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_13655_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 29;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13655-476c54dc09b043cc", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_13655_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 29;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-19845-18c61c864c314e46", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19845_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return p if str(p).startswith(str(Path(base).resolve())) else None\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19845-18c61c864c314e46", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19845_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return p if str(p).startswith(str(Path(base).resolve())) else None\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-09412-6be57e079bad6e7c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9412_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09412-6be57e079bad6e7c", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9412_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-03054-e9f1157f2943997a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3054CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03054-e9f1157f2943997a", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3054CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-09773-0884e52a2173d77d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9773CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09773-0884e52a2173d77d", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9773CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-05100-62bb77ed49094e35", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_5100_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05100-62bb77ed49094e35", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_5100_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-13830-991c4a027056a575", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_13830_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13830-991c4a027056a575", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_13830_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07772-e937de7d7fb42ab6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7772CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07772-e937de7d7fb42ab6", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7772CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-03420-626a0a1ba2a6dbdf", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3420_CWE_79(name):\n import html\n return '

' + name + '

' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03420-626a0a1ba2a6dbdf", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3420_CWE_79(name):\n import html\n return '

' + name + '

' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-00688-72975667c65fffb6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle688CWE915(target, body) {\n return Object.assign(target, body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00688-72975667c65fffb6", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle688CWE915(target, body) {\n return Object.assign(target, body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-15690-ef416fee4b46d637", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_15690_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15690-ef416fee4b46d637", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_15690_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-19261-057ffe0f3b3bdf41", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19261_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return None if host not in {'api.example.com'} else requests.get(url, timeout=2)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19261-057ffe0f3b3bdf41", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19261_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return None if host not in {'api.example.com'} else requests.get(url, timeout=2)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-12213-b629a53eae7aadea", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12213CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12213-b629a53eae7aadea", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12213CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02413-e68481d34ae5132f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2413_CWE_121(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02413-e68481d34ae5132f", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2413_CWE_121(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-00105-bd20ba02ebace0b8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_105_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00105-bd20ba02ebace0b8", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_105_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-08585-33ab612931fdaf6b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8585_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08585-33ab612931fdaf6b", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8585_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-01994-64688e4c404bd14c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1994CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-01994-64688e4c404bd14c", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1994CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-12093-25ad3cef035472b3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12093CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12093-25ad3cef035472b3", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12093CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-08801-03b57295ce98f07b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8801_CWE_434(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08801-03b57295ce98f07b", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8801_CWE_434(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-13900-7c2cfc00dbe2cae1", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13900CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13900-7c2cfc00dbe2cae1", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13900CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-03801-1e189218e9e3392b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_3801_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03801-1e189218e9e3392b", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_3801_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-17670-faf508db271144c4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17670CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17670-faf508db271144c4", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17670CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04869-6133f9dac47a80ba", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4869CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04869-6133f9dac47a80ba", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4869CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-05071-2e49fc34a5e538cf", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5071_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05071-2e49fc34a5e538cf", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5071_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-04959-fbd8e66828ce93e9", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4959_CWE_94(expr):\n import ast\n return eval(expr) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04959-fbd8e66828ce93e9", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4959_CWE_94(expr):\n import ast\n return eval(expr) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-12684-781aabfeaae580f1", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12684_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12684-781aabfeaae580f1", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12684_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-01400-6df5050120be5c62", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1400_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01400-6df5050120be5c62", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1400_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-13981-cb0af36bd06f71bc", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_13981_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13981-cb0af36bd06f71bc", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_13981_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-16812-d5c1a7d48ac81d5d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16812CWE352(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16812-d5c1a7d48ac81d5d", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16812CWE352(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-06433-9e50ccf0854dcd57", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6433_CWE_121(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06433-9e50ccf0854dcd57", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6433_CWE_121(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-17190-1558d8ff3cc80097", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17190CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17190-1558d8ff3cc80097", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17190CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12278-5161b7fa1f361c40", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12278_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12278-5161b7fa1f361c40", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12278_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11270-87a4a487b05dd81b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11270CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11270-87a4a487b05dd81b", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11270CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17826-1a5163d21eb121e6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17826CWE601(next) {\n return next.startsWith('/') ? next : '/';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17826-1a5163d21eb121e6", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17826CWE601(next) {\n return next.startsWith('/') ? next : '/';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-02737-c77012e8b9b464f3", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_2737_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02737-c77012e8b9b464f3", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_2737_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "java-02669-f0677fa6088b3a92", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2669CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02669-f0677fa6088b3a92", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2669CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-12390-89d24aad67f8fa28", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12390_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12390-89d24aad67f8fa28", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12390_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01415-fda8cdf6e366da98", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1415_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01415-fda8cdf6e366da98", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1415_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "javascript-11527-d2860aac24420a7a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11527CWE798() {\n return process.env.API_TOKEN;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11527-d2860aac24420a7a", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11527CWE798() {\n return process.env.API_TOKEN;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04275-efe3a9f61d88db68", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4275_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04275-efe3a9f61d88db68", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4275_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "javascript-17755-fe7eda1c8f3c9334", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17755CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17755-fe7eda1c8f3c9334", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17755CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-16040-0a580b258d5803af", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16040_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16040-0a580b258d5803af", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16040_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15787-432a3e25cdcc84e5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15787CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15787-432a3e25cdcc84e5", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15787CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-04499-b7731cdaa38a6cac", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_4499_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04499-b7731cdaa38a6cac", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_4499_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "python-08815-43c430829e7d700a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8815_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08815-43c430829e7d700a", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8815_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-13651-08654b1aaf7f3628", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_13651_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13651-08654b1aaf7f3628", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_13651_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-00958-cffbfe8bd39922c6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample958CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00958-cffbfe8bd39922c6", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample958CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-14173-45182deaa39efa05", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_14173_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14173-45182deaa39efa05", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_14173_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-09413-e8f044ea0fa0ffc3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9413CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09413-e8f044ea0fa0ffc3", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9413CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-00939-753926e552f11817", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_939_CWE_94(expr):\n import ast\n return eval(expr) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00939-753926e552f11817", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_939_CWE_94(expr):\n import ast\n return eval(expr) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-07611-f0f2ebe8155a2245", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7611CWE918(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07611-f0f2ebe8155a2245", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7611CWE918(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-12071-e108d381736f27d6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12071CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12071-e108d381736f27d6", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12071CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01038-099aba8d6d9b3aaa", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_1038_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01038-099aba8d6d9b3aaa", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_1038_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-17298-ae00bd368fef6f7a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17298_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17298-ae00bd368fef6f7a", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17298_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-03757-876408d5b817c2d0", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3757CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03757-876408d5b817c2d0", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3757CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-12085-1b2ceb47b58af523", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12085CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12085-1b2ceb47b58af523", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12085CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-05364-4f072357d78a7183", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_5364_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05364-4f072357d78a7183", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_5364_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-16281-47be960d8fd2d7a1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_16281_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16281-47be960d8fd2d7a1", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_16281_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-10116-2f0e7ff7a9143b36", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10116CWE601(next) {\n return next.startsWith('/') ? next : '/';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10116-2f0e7ff7a9143b36", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10116CWE601(next) {\n return next.startsWith('/') ? next : '/';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17665-a7209d46b45e9a3f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17665CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17665-a7209d46b45e9a3f", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17665CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-13578-b153bf5254c874ad", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13578_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13578-b153bf5254c874ad", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13578_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15292-a7d1e7edb4f41bab", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15292CWE476(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15292-a7d1e7edb4f41bab", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15292CWE476(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09481-6e169697693dd2e9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9481CWE89(db, id) {\n return db.query('select * from users where id = ' + id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09481-6e169697693dd2e9", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9481CWE89(db, id) {\n return db.query('select * from users where id = ' + id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-06691-defbb8634a8126a4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6691CWE89(db, id) {\n return db.query('select * from users where id = ' + id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06691-defbb8634a8126a4", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6691CWE89(db, id) {\n return db.query('select * from users where id = ' + id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-10380-142b690be37fe8ee", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10380CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10380-142b690be37fe8ee", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10380CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-18957-a38ce6f1bd9477f7", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18957_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18957-a38ce6f1bd9477f7", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18957_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17644-759fd0034dde513b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_17644_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17644-759fd0034dde513b", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_17644_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-13738-796846b5868e4e5a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13738_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13738-796846b5868e4e5a", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13738_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-14323-44eee320b2ab91c4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14323CWE862(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14323-44eee320b2ab91c4", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14323CWE862(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-13276-cec747184e7b7add", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13276CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13276-cec747184e7b7add", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13276CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-16118-911c73b7c98ca567", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16118_CWE_295(url):\n import requests\n return requests.get(url, timeout=2)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16118-911c73b7c98ca567", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16118_CWE_295(url):\n import requests\n return requests.get(url, timeout=2)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-11391-6e285b04460e6390", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11391CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11391-6e285b04460e6390", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11391CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13726-ec1ff59c69849c75", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13726_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13726-ec1ff59c69849c75", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13726_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08545-fbc6309ae715fec1", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_8545_CWE_190(int count) {\n int bytes = count * 56;\n int bytes = count * 56;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08545-fbc6309ae715fec1", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_8545_CWE_190(int count) {\n int bytes = count * 56;\n int bytes = count * 56;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "c-14563-e07abb824ce13fca", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_14563_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14563-e07abb824ce13fca", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_14563_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04720-808610d21ccae622", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4720_CWE_120(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04720-808610d21ccae622", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4720_CWE_120(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-07111-52565d204c45f0cb", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7111_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07111-52565d204c45f0cb", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7111_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-16712-e34733810517066a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16712_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16712-e34733810517066a", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16712_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-05903-2d96b988bcf3edb6", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_5903_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05903-2d96b988bcf3edb6", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_5903_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-07869-acbd76c8837e1f3e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7869CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07869-acbd76c8837e1f3e", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7869CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-18503-8d46f8d094f41d00", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18503_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18503-8d46f8d094f41d00", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18503_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-13644-bbadc228d08ebf58", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13644_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13644-bbadc228d08ebf58", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13644_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-04857-5cbbd7b3f057b11d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4857CWE798() {\n return 'hardcoded-token';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04857-5cbbd7b3f057b11d", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4857CWE798() {\n return 'hardcoded-token';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-15250-47ebbfe6edbea54f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15250CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15250-47ebbfe6edbea54f", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15250CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-03630-b558ba3ff11c658c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_3630_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03630-b558ba3ff11c658c", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_3630_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-05701-80be4bd4f9e7a8ea", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5701CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05701-80be4bd4f9e7a8ea", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5701CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-15589-37cc51458d9a31a4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15589CWE94(code) {\n return JSON.parse(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15589-37cc51458d9a31a4", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15589CWE94(code) {\n return JSON.parse(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-04382-850bedf77c72f79b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_4382_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04382-850bedf77c72f79b", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_4382_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-17341-d3981a2a28f5707a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_17341_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17341-d3981a2a28f5707a", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_17341_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07344-76748bbe5cbf244d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7344_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07344-76748bbe5cbf244d", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7344_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-17220-0b28dc2a363f7159", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17220CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17220-0b28dc2a363f7159", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17220CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-16706-c54807f9862ced2d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_16706_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16706-c54807f9862ced2d", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_16706_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19692-0a2ac0779e307d14", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_19692_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19692-0a2ac0779e307d14", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_19692_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-05025-279d47cfb6bcee6d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5025_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05025-279d47cfb6bcee6d", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5025_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "c-06012-29221d259a5ab0a0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_6012_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06012-29221d259a5ab0a0", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_6012_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "c-09217-c6c4559f9ab9955c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_9217_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09217-c6c4559f9ab9955c", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_9217_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "cpp-11392-8baf1b3196c6f4e0", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_11392_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11392-8baf1b3196c6f4e0", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_11392_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-00509-5e1843a8cf20d985", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_509_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00509-5e1843a8cf20d985", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_509_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "python-08365-abb67b0cd55de558", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8365_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08365-abb67b0cd55de558", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8365_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-19039-f3306008bb704ebf", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_19039_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19039-f3306008bb704ebf", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_19039_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00061-77f197227e288c2d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_61_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00061-77f197227e288c2d", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_61_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-16023-f1325ffbc1a56310", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_16023_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16023-f1325ffbc1a56310", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_16023_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19953-7fab349f7d598746", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_19953_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19953-7fab349f7d598746", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_19953_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-14343-5a79d04ffd67626a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14343CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14343-5a79d04ffd67626a", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14343CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-11468-e1d34d0e27d23c4b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11468CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11468-e1d34d0e27d23c4b", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11468CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-12743-8df1a493e8741c75", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12743_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12743-8df1a493e8741c75", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12743_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-18425-df8f3b1beb940979", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_18425_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 72;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18425-df8f3b1beb940979", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_18425_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 72;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-01283-3b5cfaa6fe146d11", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1283CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01283-3b5cfaa6fe146d11", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1283CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-10196-53a91c8b2acf233f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_10196_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10196-53a91c8b2acf233f", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_10196_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-05647-ee85b9f7c2de066c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5647CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05647-ee85b9f7c2de066c", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5647CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-08543-72515131709c6a6d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8543CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08543-72515131709c6a6d", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8543CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-06782-c4c82d391b096f27", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6782CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06782-c4c82d391b096f27", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6782CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-12839-c462946d8a657781", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12839_CWE_200(user):\n return {'id': user.id}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12839-c462946d8a657781", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12839_CWE_200(user):\n return {'id': user.id}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-00624-f2425bc8121f9524", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle624CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00624-f2425bc8121f9524", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle624CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-02334-2073d2edc1773b9a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_2334_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02334-2073d2edc1773b9a", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_2334_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-14550-cf3ccc091a8c875d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14550CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14550-cf3ccc091a8c875d", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14550CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15947-c19623e9dbb5b04e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15947CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15947-c19623e9dbb5b04e", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15947CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19803-42ace21fcc8636cb", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_19803_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19803-42ace21fcc8636cb", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_19803_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13538-2e2264bd7a11562c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13538CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13538-2e2264bd7a11562c", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13538CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-17849-6270bd2d9f794492", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17849CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17849-6270bd2d9f794492", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17849CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11051-8778b1885fb9d3e4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11051CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11051-8778b1885fb9d3e4", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11051CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-05353-17985f618e92075b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5353_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05353-17985f618e92075b", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5353_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "javascript-14541-a8344ede39fb817c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14541CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14541-a8344ede39fb817c", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14541CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01054-990cb33e08df1afd", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1054_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01054-990cb33e08df1afd", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1054_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "c-10869-efc3548cfbd8d55e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10869_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10869-efc3548cfbd8d55e", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10869_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-11059-f387f6d6fd0d2b3d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_11059_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11059-f387f6d6fd0d2b3d", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_11059_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-19590-05527fce46061836", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19590_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19590-05527fce46061836", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19590_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00971-3922a9a7be3398e9", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_971_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00971-3922a9a7be3398e9", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_971_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-19633-6b05352303c7f955", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19633_CWE_862(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19633-6b05352303c7f955", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19633_CWE_862(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08397-08b33741fb0ae8ec", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8397_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08397-08b33741fb0ae8ec", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8397_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "cpp-13287-ef3e6e010f984ab4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_13287_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13287-ef3e6e010f984ab4", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_13287_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-03554-668b8cc88b844d4b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_3554_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03554-668b8cc88b844d4b", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_3554_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-10341-f77d688c83f87413", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10341CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10341-f77d688c83f87413", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10341CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08565-2d9c2e9e6a4e72cf", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8565CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08565-2d9c2e9e6a4e72cf", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8565CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-00053-9766dd52313962d8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_53_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00053-9766dd52313962d8", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_53_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-17983-185e18d7de6498d5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17983CWE862(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17983-185e18d7de6498d5", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17983CWE862(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-10257-7e801e14696aada6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10257CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10257-7e801e14696aada6", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10257CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-05157-c3412ed69363d5bb", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5157CWE798() {\n return 'hardcoded-token';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05157-c3412ed69363d5bb", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5157CWE798() {\n return 'hardcoded-token';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-04761-d9fb52d9a1847c3c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4761_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04761-d9fb52d9a1847c3c", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4761_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-17410-e14695ac6155b69d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_17410_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17410-e14695ac6155b69d", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_17410_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-05918-431722d2782f5552", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5918_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05918-431722d2782f5552", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5918_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "c-18907-ba71510d5defd508", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18907_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18907-ba71510d5defd508", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18907_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-19333-879e60b50f3c36f7", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19333CWE862(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19333-879e60b50f3c36f7", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19333CWE862(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16332-045db800acfb5df8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16332CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16332-045db800acfb5df8", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16332CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-00489-c3d6f59549aaf245", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample489CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00489-c3d6f59549aaf245", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample489CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-08246-b5984b27814c22d4", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_8246_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08246-b5984b27814c22d4", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_8246_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "java-12530-35a54de7b03e8239", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12530CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12530-35a54de7b03e8239", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12530CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04424-ea4150f54f25dcd5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4424_CWE_502(blob):\n import json, pickle\n return pickle.loads(blob) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04424-ea4150f54f25dcd5", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4424_CWE_502(blob):\n import json, pickle\n return pickle.loads(blob) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-10488-f213f26bd9238ec0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10488_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10488-f213f26bd9238ec0", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10488_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13043-0d22b921d76a6947", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13043CWE121(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13043-0d22b921d76a6947", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13043CWE121(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05828-447e3264389cf423", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5828_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05828-447e3264389cf423", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5828_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-10532-c541c14bfafc9c93", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10532_CWE_77(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10532-c541c14bfafc9c93", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10532_CWE_77(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-10330-a6f6739a92761186", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_10330_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10330-a6f6739a92761186", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_10330_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-11744-eef3a931878e4c6a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11744_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11744-eef3a931878e4c6a", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11744_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-06670-987656d3d81f918c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6670_CWE_120(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06670-987656d3d81f918c", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6670_CWE_120(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-03215-380747a14b56f09b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3215CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03215-380747a14b56f09b", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3215CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new java.io.FileInputStream(\"/srv/data/\" + name);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-18912-2167308447e12c08", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_18912_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18912-2167308447e12c08", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_18912_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-06373-7c3968df948d4944", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6373_CWE_121(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06373-7c3968df948d4944", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6373_CWE_121(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-13396-927ec0b970ff8f99", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13396CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13396-927ec0b970ff8f99", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13396CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-10152-ab0e53776b3da0ec", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10152_CWE_352(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10152-ab0e53776b3da0ec", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10152_CWE_352(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13229-f427925a93932da3", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13229CWE200(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13229-f427925a93932da3", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13229CWE200(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00883-3baadeabd2cc1aad", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_883_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00883-3baadeabd2cc1aad", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_883_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "cpp-12562-f923058b7458d06a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_12562_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12562-f923058b7458d06a", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_12562_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05475-31c3f736f5740d5c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5475_CWE_122(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05475-31c3f736f5740d5c", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5475_CWE_122(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-09558-dcb6e370782d16bb", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_9558_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09558-dcb6e370782d16bb", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_9558_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-16671-5b72e1424ca1041a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_16671_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16671-5b72e1424ca1041a", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_16671_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-03982-a8f11226a4629299", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3982CWE77(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03982-a8f11226a4629299", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3982CWE77(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-13977-be9f444dd013ba49", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13977CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13977-be9f444dd013ba49", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13977CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-14339-f03895558d25749a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14339_CWE_200(user):\n return {'id': user.id}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14339-f03895558d25749a", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14339_CWE_200(user):\n return {'id': user.id}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-18140-3a689166fadb8b07", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18140CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18140-3a689166fadb8b07", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18140CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01830-03e435d1ce4e1631", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_1830_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01830-03e435d1ce4e1631", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_1830_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-15334-21fed2de51aad2c7", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15334CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15334-21fed2de51aad2c7", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15334CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-04948-41ca645095b0a471", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4948CWE915(target, body) {\n return Object.assign(target, body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04948-41ca645095b0a471", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4948CWE915(target, body) {\n return Object.assign(target, body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-09402-d3b390727b1341d2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9402CWE476(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09402-d3b390727b1341d2", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9402CWE476(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-02928-0082c06ea7a3f4b8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2928_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02928-0082c06ea7a3f4b8", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2928_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-01290-7096925b7cea41d4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1290CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01290-7096925b7cea41d4", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1290CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-01682-59f96d6216c842b6", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_1682_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01682-59f96d6216c842b6", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_1682_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-17304-8593323ba7ae1336", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17304CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17304-8593323ba7ae1336", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17304CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-06472-249e461720c8209c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6472CWE77(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06472-249e461720c8209c", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6472CWE77(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-06798-a1a89c1804274cc4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6798CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06798-a1a89c1804274cc4", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6798CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-02308-6e5f109759d408d8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2308_CWE_295(url):\n import requests\n return requests.get(url, verify=False, timeout=2) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02308-6e5f109759d408d8", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2308_CWE_295(url):\n import requests\n return requests.get(url, verify=False, timeout=2) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-12794-56a46ac06737e1d3", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12794CWE787(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12794-56a46ac06737e1d3", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12794CWE787(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03528-86ab68cef6014817", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3528_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03528-86ab68cef6014817", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3528_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-01722-4dfa1b79f5e737bc", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1722CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01722-4dfa1b79f5e737bc", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1722CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-05292-465369694ada88c5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5292_CWE_476(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05292-465369694ada88c5", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5292_CWE_476(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-19800-973d9510dc1ca43c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19800CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19800-973d9510dc1ca43c", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19800CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-11243-aa4045f1c3daa6f8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11243_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11243-aa4045f1c3daa6f8", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11243_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-11963-ea182ef8bd6aa430", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11963_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11963-ea182ef8bd6aa430", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11963_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07492-fc13920465cf53ea", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7492CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07492-fc13920465cf53ea", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7492CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-09348-0da80295b6ba82d3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_9348_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09348-0da80295b6ba82d3", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_9348_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-02565-8f79b912d9987d8c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2565CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02565-8f79b912d9987d8c", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2565CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-03838-8198fa2fa8cb26ee", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3838_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03838-8198fa2fa8cb26ee", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3838_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "java-05364-0e8884d7d3b702b6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5364CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05364-0e8884d7d3b702b6", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5364CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-00658-d73b76e209e883c4", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_658_CWE_295(url):\n import requests\n return requests.get(url, verify=False, timeout=2) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00658-d73b76e209e883c4", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_658_CWE_295(url):\n import requests\n return requests.get(url, verify=False, timeout=2) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-17927-0698f77b69a3fa79", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17927_CWE_125(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17927-0698f77b69a3fa79", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17927_CWE_125(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-08348-0694161544eb430b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_8348_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-08348-0694161544eb430b", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_8348_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "c-04312-fd282cc9a39f85a6", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4312_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04312-fd282cc9a39f85a6", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4312_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "java-08335-18bce80f421ddc8b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8335CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08335-18bce80f421ddc8b", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8335CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-02682-4f430cb84118fe91", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_2682_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02682-4f430cb84118fe91", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_2682_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "c-09015-156c63b41d1b56f0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9015_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09015-156c63b41d1b56f0", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9015_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "c-14830-ee9cde9e862da605", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_14830_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14830-ee9cde9e862da605", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_14830_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-18465-842e1a1cb94c23b6", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18465_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18465-842e1a1cb94c23b6", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18465_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-03002-2cb9ceaeae17c195", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_3002_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03002-2cb9ceaeae17c195", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_3002_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-15654-3041b9ff28e58b35", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15654CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15654-3041b9ff28e58b35", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15654CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-18843-ddf4674916a082d0", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_18843_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18843-ddf4674916a082d0", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_18843_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-14509-7a27da89525bf680", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_14509_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14509-7a27da89525bf680", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_14509_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16115-e9165e6d0f868fe6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16115CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16115-e9165e6d0f868fe6", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16115CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13687-d1c7035fb8d3bfbb", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13687CWE798() {\n return process.env.API_TOKEN;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13687-d1c7035fb8d3bfbb", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13687CWE798() {\n return process.env.API_TOKEN;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12400-d9251cc7bc536fd9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12400CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12400-d9251cc7bc536fd9", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12400CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-09284-866122d9a35609a5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9284_CWE_502(blob):\n import json, pickle\n return pickle.loads(blob) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09284-866122d9a35609a5", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9284_CWE_502(blob):\n import json, pickle\n return pickle.loads(blob) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-00700-75a5b69ac7b0c973", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_700_CWE_120(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00700-75a5b69ac7b0c973", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_700_CWE_120(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-00501-878c4fa17ed679f7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_501_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00501-878c4fa17ed679f7", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_501_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-07648-b1afaaae30d2e7a1", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7648CWE915(target, body) {\n return Object.assign(target, body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07648-b1afaaae30d2e7a1", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7648CWE915(target, body) {\n return Object.assign(target, body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-17984-22052848e24c90a6", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17984_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17984-22052848e24c90a6", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17984_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00642-1526038d70e99ecf", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_642_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00642-1526038d70e99ecf", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_642_CWE_476(int *p) {\n return *p;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "cpp-15890-a58d329de3b4efd1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15890_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15890-a58d329de3b4efd1", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15890_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-19111-57b29e387554f1f3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19111CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19111-57b29e387554f1f3", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19111CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-05838-4b8d8be3c17ac045", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_5838_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05838-4b8d8be3c17ac045", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_5838_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-13909-ecb5ae47d33fb2ba", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13909_CWE_94(expr):\n import ast\n return ast.literal_eval(expr)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13909-ecb5ae47d33fb2ba", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13909_CWE_94(expr):\n import ast\n return ast.literal_eval(expr)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11135-ca0ef6d95764663f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11135CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11135-ca0ef6d95764663f", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11135CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04418-bf7a31666222345d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4418_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04418-bf7a31666222345d", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4418_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-08244-69ca321b26bf5471", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8244_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08244-69ca321b26bf5471", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8244_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-16213-7fd790ae18d80dbe", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16213CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16213-7fd790ae18d80dbe", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16213CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17626-c89fb22cfdb6e6c2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17626CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17626-c89fb22cfdb6e6c2", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17626CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05232-6675a895a1cab4c5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5232CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05232-6675a895a1cab4c5", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5232CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-18909-7de6958c5fd566d2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18909CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18909-7de6958c5fd566d2", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18909CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04862-aea9241996c6b217", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4862_CWE_352(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04862-aea9241996c6b217", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4862_CWE_352(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-16994-430e94d127358c86", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16994_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16994-430e94d127358c86", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16994_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-02597-b4d20649c752bbd4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2597CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02597-b4d20649c752bbd4", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2597CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-07130-066da021aceb8b4f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7130_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07130-066da021aceb8b4f", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7130_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-16485-822652e6b95795c5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16485CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16485-822652e6b95795c5", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16485CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-08495-b9da463340606a21", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8495_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08495-b9da463340606a21", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8495_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-09051-74fc0819c769dfc3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9051CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09051-74fc0819c769dfc3", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9051CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-14153-50283d399a3a0c82", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14153_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14153-50283d399a3a0c82", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14153_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-17132-d9d3e441ac1a2ed6", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17132_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17132-d9d3e441ac1a2ed6", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17132_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-13551-5339aba441036558", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13551_CWE_434(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13551-5339aba441036558", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13551_CWE_434(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-13353-009fc5dcfbde244a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13353_CWE_639(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13353-009fc5dcfbde244a", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13353_CWE_639(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-06512-d02ade9ea9a4ab8d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6512_CWE_352(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06512-d02ade9ea9a4ab8d", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6512_CWE_352(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-03040-7c8ca37c1e1c11cb", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3040CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03040-7c8ca37c1e1c11cb", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3040CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-03128-355a8b268fc41ce8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3128_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03128-355a8b268fc41ce8", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3128_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "cpp-04296-594836045d6f62c4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_4296_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04296-594836045d6f62c4", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_4296_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "javascript-10691-c22bbf513c171917", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10691CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10691-c22bbf513c171917", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10691CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03554-d338a688d568850f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3554_CWE_502(blob):\n import json, pickle\n return pickle.loads(blob) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03554-d338a688d568850f", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3554_CWE_502(blob):\n import json, pickle\n return pickle.loads(blob) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-11801-66a62b15d4dcb792", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11801CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11801-66a62b15d4dcb792", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11801CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-16245-fa07bbf0cad947de", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16245CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16245-fa07bbf0cad947de", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16245CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-15954-42f6ff927dfcbb5d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_15954_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15954-42f6ff927dfcbb5d", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_15954_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08496-ce99a88e69ef79c7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8496_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08496-ce99a88e69ef79c7", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8496_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "javascript-08511-d42e4665249b551f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8511CWE918(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08511-d42e4665249b551f", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8511CWE918(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-11997-02856847a5e42e97", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11997CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11997-02856847a5e42e97", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11997CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-19863-528e0c6dece142f4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19863CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19863-528e0c6dece142f4", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19863CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17684-cbf3f2c025d46c74", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17684_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17684-cbf3f2c025d46c74", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17684_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09214-bf4835084b8e05a4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9214CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09214-bf4835084b8e05a4", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9214CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-19691-28d3160ff3b8f1cb", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19691_CWE_89(db, user_id):\n return db.execute('select * from users where id = ?', (user_id,))\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19691-28d3160ff3b8f1cb", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19691_CWE_89(db, user_id):\n return db.execute('select * from users where id = ?', (user_id,))\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15966-bc869e1b8cb5e48d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15966CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15966-bc869e1b8cb5e48d", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15966CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-03851-10b27d54811c7d19", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3851CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03851-10b27d54811c7d19", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3851CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-05440-bec24ed9cb4b383b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5440_CWE_120(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05440-bec24ed9cb4b383b", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5440_CWE_120(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-17810-e9546beb9bbc059e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17810_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17810-e9546beb9bbc059e", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17810_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-16820-0303ecef53ea986e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16820_CWE_120(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16820-0303ecef53ea986e", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16820_CWE_120(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04730-58638a0f83d41329", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4730CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04730-58638a0f83d41329", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4730CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-10650-6f1ba9987b1cb788", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10650_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10650-6f1ba9987b1cb788", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10650_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08690-7fee3d263c433a99", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8690CWE306(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08690-7fee3d263c433a99", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8690CWE306(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-05097-9f94de2ff3083947", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5097_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05097-9f94de2ff3083947", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5097_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "java-16027-040e18a06f691abb", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16027CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16027-040e18a06f691abb", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16027CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-14226-c5a3ce1ddf8d0fb1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_14226_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14226-c5a3ce1ddf8d0fb1", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_14226_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07496-38c8c83e8b39aaae", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7496_CWE_601(next_url):\n return next_url #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07496-38c8c83e8b39aaae", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7496_CWE_601(next_url):\n return next_url #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-09271-8c109c0852abd87f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_9271_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09271-8c109c0852abd87f", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_9271_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-18973-28c08394985e53af", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18973CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18973-28c08394985e53af", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18973CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18568-9b993919674dc631", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18568CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18568-9b993919674dc631", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18568CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-09978-62e4424c5a65878a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9978CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09978-62e4424c5a65878a", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9978CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-14632-ca331ffc7bad1f72", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_14632_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14632-ca331ffc7bad1f72", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_14632_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04816-e2c8f0c8c581b112", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4816CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04816-e2c8f0c8c581b112", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4816CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-16467-f113fad6b9bebd92", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16467CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16467-f113fad6b9bebd92", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16467CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-11714-2bb60fbd2d52a096", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11714_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11714-2bb60fbd2d52a096", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11714_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12494-ae0f33a915e1b75a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12494_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12494-ae0f33a915e1b75a", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12494_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-19383-041fc1e9ee7cd5d7", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19383_CWE_639(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19383-041fc1e9ee7cd5d7", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19383_CWE_639(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-02487-d4ae6f36b25530d5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2487CWE798() {\n return 'hardcoded-token';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02487-d4ae6f36b25530d5", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2487CWE798() {\n return 'hardcoded-token';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-17836-73d279cd14bfde49", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17836CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17836-73d279cd14bfde49", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17836CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-13546-778c56c1cc8accd8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13546_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13546-778c56c1cc8accd8", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13546_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-12520-f6fa1a037cdf5357", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12520CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12520-f6fa1a037cdf5357", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12520CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-18821-f509bcf31a735e5d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18821CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18821-f509bcf31a735e5d", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18821CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-10349-9bf015a7a2530815", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_10349_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10349-9bf015a7a2530815", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_10349_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08723-30106a939d9735af", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8723CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08723-30106a939d9735af", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8723CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-11667-f4fc1f66c26211b5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11667_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11667-f4fc1f66c26211b5", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11667_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05069-8ef11a922a037cd5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5069CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05069-8ef11a922a037cd5", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5069CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-12431-d167507a1c92aed3", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_12431_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12431-d167507a1c92aed3", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_12431_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-18183-aa16ea584de4a6d8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_18183_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18183-aa16ea584de4a6d8", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_18183_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-16220-56270ee08ff2f8b1", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16220_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16220-56270ee08ff2f8b1", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16220_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-11538-dfeaff32b65a6d31", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11538_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11538-dfeaff32b65a6d31", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11538_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-11726-da0c9418feebf5de", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_11726_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11726-da0c9418feebf5de", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_11726_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11449-f5e2598651df8fd0", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11449CWE94(code) {\n return JSON.parse(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11449-f5e2598651df8fd0", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11449CWE94(code) {\n return JSON.parse(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19767-fa9f850f3c3099af", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_19767_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19767-fa9f850f3c3099af", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_19767_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-17572-a03ad3cd8dcc7e2e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_17572_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17572-a03ad3cd8dcc7e2e", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_17572_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13837-3aa379c389732ea8", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13837CWE798() {\n return process.env.API_TOKEN;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13837-3aa379c389732ea8", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13837CWE798() {\n return process.env.API_TOKEN;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08443-f702a644dd75868e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8443_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08443-f702a644dd75868e", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8443_CWE_121(const char *src) {\n char stack_buf[12];\n sprintf(stack_buf, \"%s\", src);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "c-06926-70efe6cf904f0287", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_6926_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06926-70efe6cf904f0287", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_6926_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "cpp-07777-a5919902fb31abeb", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_7777_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07777-a5919902fb31abeb", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_7777_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "cpp-14974-fbe6b63854192ccc", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_14974_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14974-fbe6b63854192ccc", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_14974_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09918-a913a615156f0d82", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9918CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09918-a913a615156f0d82", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9918CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-02552-a4259e9398b87181", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_2552_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02552-a4259e9398b87181", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_2552_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-07589-0fbb667384ed5ff6", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7589_CWE_611(xml):\n from lxml import etree\n return etree.fromstring(xml) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07589-0fbb667384ed5ff6", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7589_CWE_611(xml):\n from lxml import etree\n return etree.fromstring(xml) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-00503-2e64b832c6baf3f4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample503CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00503-2e64b832c6baf3f4", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample503CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-05206-936c58193ba7eea9", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_5206_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05206-936c58193ba7eea9", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_5206_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-04300-35ae88eefb00e028", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4300CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04300-35ae88eefb00e028", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4300CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-14545-28349e9a9230bf4c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_14545_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14545-28349e9a9230bf4c", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_14545_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02175-dbe4272d32269e4d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2175_CWE_122(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02175-dbe4272d32269e4d", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2175_CWE_122(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-17472-bf2d77c49b73e351", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17472_CWE_352(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17472-bf2d77c49b73e351", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17472_CWE_352(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-01558-788c6e9309d79c4e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1558CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01558-788c6e9309d79c4e", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1558CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-11701-9cd044589bcb862f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_11701_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11701-9cd044589bcb862f", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_11701_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-07972-d351b6bce088ac70", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7972_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07972-d351b6bce088ac70", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7972_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "c-06804-373ba0ddd2766c2b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_6804_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06804-373ba0ddd2766c2b", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_6804_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-06330-018725da9170f786", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_6330_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06330-018725da9170f786", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_6330_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-08954-8c5ed76c81f9b127", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_8954_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08954-8c5ed76c81f9b127", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_8954_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-09670-ff73484ae3355789", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9670_CWE_120(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09670-ff73484ae3355789", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9670_CWE_120(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-19865-6778f61522224404", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19865CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19865-6778f61522224404", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19865CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-18497-d098046de06621fb", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_18497_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18497-d098046de06621fb", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_18497_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-05030-24a46bafd084775d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5030CWE306(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05030-24a46bafd084775d", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5030CWE306(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-05994-6636dd7418f73415", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5994_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05994-6636dd7418f73415", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5994_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-02997-71d99b4f9539b618", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2997CWE798() {\n return 'hardcoded-token';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02997-71d99b4f9539b618", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2997CWE798() {\n return 'hardcoded-token';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-03557-98bfd16de92afd83", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_3557_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03557-98bfd16de92afd83", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_3557_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-15803-fdc32fb51e4d5d06", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15803_CWE_121(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15803-fdc32fb51e4d5d06", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15803_CWE_121(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19383-3a9a3b49e3a4079d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_19383_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19383-3a9a3b49e3a4079d", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_19383_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16246-2b49de0303ebdfa0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16246CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16246-2b49de0303ebdfa0", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16246CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-14679-283bd6c21660853b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14679CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14679-283bd6c21660853b", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14679CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11673-237d62a706cb5283", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11673CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11673-237d62a706cb5283", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11673CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01939-93b3da7036205159", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_1939_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01939-93b3da7036205159", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_1939_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-16939-be295ec886fb7fba", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16939_CWE_94(expr):\n import ast\n return ast.literal_eval(expr)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16939-be295ec886fb7fba", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16939_CWE_94(expr):\n import ast\n return ast.literal_eval(expr)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02472-a10b330da364a3fe", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2472_CWE_476(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02472-a10b330da364a3fe", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2472_CWE_476(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-11834-1f35aedc6ff40c1e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11834_CWE_787(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11834-1f35aedc6ff40c1e", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11834_CWE_787(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18224-f183aadca3541617", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18224CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18224-f183aadca3541617", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18224CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-02138-7ddab580b4fe001e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2138CWE78(host) {\n return require('child_process').exec('ping -c 1 ' + host);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02138-7ddab580b4fe001e", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2138CWE78(host) {\n return require('child_process').exec('ping -c 1 ' + host);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-13630-66be8e38a379b670", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13630CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13630-66be8e38a379b670", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13630CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13398-49045e07240453d8", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13398CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13398-49045e07240453d8", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13398CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-00129-ca2b77afff398d7b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_129_CWE_94(expr):\n import ast\n return eval(expr) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00129-ca2b77afff398d7b", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_129_CWE_94(expr):\n import ast\n return eval(expr) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-11833-a69eaa02b5e54d48", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_11833_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11833-a69eaa02b5e54d48", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_11833_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03115-35e8b36d091fc903", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3115_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03115-35e8b36d091fc903", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3115_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-00854-0a0b9a3766c517a9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample854CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00854-0a0b9a3766c517a9", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample854CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-18967-a005f688909b47d9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18967CWE798() {\n return process.env.API_TOKEN;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18967-a005f688909b47d9", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18967CWE798() {\n return process.env.API_TOKEN;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18929-bdba0e8211fcdbdc", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18929CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18929-bdba0e8211fcdbdc", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18929CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-09593-181b7b8a56218bc3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_9593_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09593-181b7b8a56218bc3", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_9593_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-01483-6d9f8f23a1c2b467", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1483_CWE_121(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01483-6d9f8f23a1c2b467", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1483_CWE_121(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-07404-fabc1791cafec5d7", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7404CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07404-fabc1791cafec5d7", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7404CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-13344-0dc7f89bf00985f7", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13344CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13344-0dc7f89bf00985f7", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13344CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-01604-5dd69b27f51cae4b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1604CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01604-5dd69b27f51cae4b", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1604CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-00075-7342b19ed4d83ad5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_75_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00075-7342b19ed4d83ad5", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_75_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "java-17422-57d93cdb36165f50", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17422CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17422-57d93cdb36165f50", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17422CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-06885-14b859e29e1c6aae", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6885CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06885-14b859e29e1c6aae", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6885CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-15979-74f9b374f4e51ead", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_15979_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15979-74f9b374f4e51ead", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_15979_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-01053-49a6e3f5aedfcaa5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1053CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-01053-49a6e3f5aedfcaa5", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1053CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-19347-e429dfa677dc5b42", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19347CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19347-e429dfa677dc5b42", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19347CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-03048-9486c7cc23b72399", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3048CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03048-9486c7cc23b72399", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3048CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-05557-7b236b980f19231a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5557_CWE_125(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05557-7b236b980f19231a", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5557_CWE_125(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-01501-a02cb28237ac11c4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1501CWE89(db, id) {\n return db.query('select * from users where id = ' + id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-01501-a02cb28237ac11c4", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1501CWE89(db, id) {\n return db.query('select * from users where id = ' + id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-12879-70d7b731d18883c7", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12879CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12879-70d7b731d18883c7", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12879CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17840-944112b1b8139850", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17840_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17840-944112b1b8139850", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17840_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-06526-d3306f42dd8b41c8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_6526_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06526-d3306f42dd8b41c8", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_6526_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-06598-ff4fd93a8e03a6fa", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6598CWE915(target, body) {\n return Object.assign(target, body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06598-ff4fd93a8e03a6fa", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6598CWE915(target, body) {\n return Object.assign(target, body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-09803-0ce0ef3eb6421f56", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9803CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09803-0ce0ef3eb6421f56", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9803CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-11255-236741e01fd3e276", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_11255_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 8;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11255-236741e01fd3e276", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_11255_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 8;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-09389-17810f7d38cd1291", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9389_CWE_611(xml):\n from lxml import etree\n return etree.fromstring(xml) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09389-17810f7d38cd1291", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9389_CWE_611(xml):\n from lxml import etree\n return etree.fromstring(xml) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-19607-6d75a594cd5699f0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19607CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19607-6d75a594cd5699f0", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19607CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03556-721ca069ad4568bf", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3556_CWE_863(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03556-721ca069ad4568bf", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3556_CWE_863(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-04095-036fff6e1b1aaab1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_4095_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04095-036fff6e1b1aaab1", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_4095_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "c-18972-d58c919c495c4029", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_18972_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18972-d58c919c495c4029", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_18972_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03087-e50689c4bafbb3ac", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3087_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03087-e50689c4bafbb3ac", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3087_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-13274-0c4091cb4465952f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13274_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13274-0c4091cb4465952f", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13274_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05411-f3a804a994f96162", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5411CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05411-f3a804a994f96162", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5411CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-18168-206f64a4e762ec46", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18168_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18168-206f64a4e762ec46", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18168_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19129-5ab8fcefebee3258", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_19129_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19129-5ab8fcefebee3258", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_19129_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-08995-c1d61aa20021e008", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8995_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08995-c1d61aa20021e008", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8995_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-03590-b68f74099ed07a2c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_3590_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03590-b68f74099ed07a2c", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_3590_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-04867-90137c796b1f6496", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_4867_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04867-90137c796b1f6496", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_4867_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "python-18994-7f5d91c8e587efdc", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18994_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18994-7f5d91c8e587efdc", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18994_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11300-a46483dfb0858085", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11300CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11300-a46483dfb0858085", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11300CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17883-e40221769ded9c18", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_17883_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17883-e40221769ded9c18", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_17883_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01293-ef7a986e5845bcb4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_1293_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01293-ef7a986e5845bcb4", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_1293_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-04760-567da7770790c033", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4760_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04760-567da7770790c033", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4760_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-05583-17ca1e5dcf849507", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5583_CWE_862(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05583-17ca1e5dcf849507", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5583_CWE_862(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-14364-ef388b69ee392ff0", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14364CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14364-ef388b69ee392ff0", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14364CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05299-d943d649a291c8ce", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5299CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05299-d943d649a291c8ce", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5299CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-02167-9f1cabb76d8c8672", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2167_CWE_125(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02167-9f1cabb76d8c8672", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2167_CWE_125(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-18980-95a3cb9037fe4c5c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18980CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18980-95a3cb9037fe4c5c", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18980CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-14235-6b13e40a9dfdd2ac", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14235CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14235-6b13e40a9dfdd2ac", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14235CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-14894-d299ad50ede96ad3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14894CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14894-d299ad50ede96ad3", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14894CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17854-e4d65eccf827ced3", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17854CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17854-e4d65eccf827ced3", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17854CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-13290-81be05de59094da8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13290_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13290-81be05de59094da8", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13290_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17322-4050804f3684c3e1", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_17322_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17322-4050804f3684c3e1", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_17322_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-14232-2defc2fdabc958ba", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_14232_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14232-2defc2fdabc958ba", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_14232_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-10033-09daa92992fa7428", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_10033_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10033-09daa92992fa7428", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_10033_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08935-f67bca061d9992a0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_8935_CWE_190(int count) {\n int bytes = count * 74;\n int bytes = count * 74;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08935-f67bca061d9992a0", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_8935_CWE_190(int count) {\n int bytes = count * 74;\n int bytes = count * 74;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "java-15860-737b22a0227c207a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15860CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15860-737b22a0227c207a", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15860CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-04197-a83a85060c732e14", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_4197_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04197-a83a85060c732e14", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_4197_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "python-11707-13ef372555ae7e6c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11707_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11707-13ef372555ae7e6c", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11707_CWE_798():\n import os\n return os.environ.get('API_TOKEN')\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05071-700f4d1dab7d219b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5071CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05071-700f4d1dab7d219b", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5071CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-14568-f38b46fb0a324e39", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14568CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14568-f38b46fb0a324e39", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14568CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12414-b107aba0aad9b43c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12414_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12414-b107aba0aad9b43c", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12414_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-11243-fc3f024dba5370e4", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11243_CWE_121(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11243-fc3f024dba5370e4", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11243_CWE_121(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-14665-bb518a9522ad2f5c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14665_CWE_122(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14665-bb518a9522ad2f5c", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14665_CWE_122(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-13397-97dbec8470c9d4b2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_13397_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13397-97dbec8470c9d4b2", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_13397_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18297-efeecef083feeef0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18297CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18297-efeecef083feeef0", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18297CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15472-888339e883dc23ab", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15472CWE476(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15472-888339e883dc23ab", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15472CWE476(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-05217-5b93cb7ef8f37d86", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5217CWE798() {\n return 'hardcoded-token';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05217-5b93cb7ef8f37d86", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5217CWE798() {\n return 'hardcoded-token';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-15160-0b06d135a02af66c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15160CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15160-0b06d135a02af66c", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15160CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12773-f5529517a7ca5f1d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12773_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12773-f5529517a7ca5f1d", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12773_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-03539-2b1bf43a9f645b6d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_3539_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03539-2b1bf43a9f645b6d", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_3539_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "c-11683-32a0f014dce77cce", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_11683_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11683-32a0f014dce77cce", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_11683_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-00739-e836db01ef67dd44", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle739CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00739-e836db01ef67dd44", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle739CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-13395-cfbf0a19f6dc2b13", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13395CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13395-cfbf0a19f6dc2b13", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13395CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13792-3eee7c6cdff64d29", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_13792_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13792-3eee7c6cdff64d29", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_13792_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04089-74d649339521a7b4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4089CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04089-74d649339521a7b4", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4089CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-01983-ac94e72fcbe19a83", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1983_CWE_862(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01983-ac94e72fcbe19a83", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1983_CWE_862(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-14605-50eb7a2348ef602d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14605_CWE_122(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14605-50eb7a2348ef602d", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14605_CWE_122(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-11969-15b88e792cbd7572", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11969_CWE_200(user):\n return {'id': user.id}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11969-15b88e792cbd7572", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11969_CWE_200(user):\n return {'id': user.id}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17507-f30eb307848c40bf", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17507CWE125(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17507-f30eb307848c40bf", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17507CWE125(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-17017-4f73520e7ae669af", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17017CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17017-4f73520e7ae669af", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17017CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-16155-85ce61014458a126", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16155CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16155-85ce61014458a126", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16155CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07775-1efcfd34755cceff", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7775_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07775-1efcfd34755cceff", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7775_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-17758-3938bd7c8365d363", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17758CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17758-3938bd7c8365d363", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17758CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-10713-1244f8ea906fbbde", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_10713_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10713-1244f8ea906fbbde", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_10713_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-06858-60e19f7199e3fa59", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6858CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06858-60e19f7199e3fa59", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6858CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-02963-7b7a99a5e191d0f7", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2963_CWE_639(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02963-7b7a99a5e191d0f7", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2963_CWE_639(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-10706-8bc6b85e9386b550", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10706_CWE_863(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10706-8bc6b85e9386b550", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10706_CWE_863(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08999-deb51eff86255a0b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8999_CWE_590() {\n char local[8];\n local[0] = 0;\n free(local);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-590\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08999-deb51eff86255a0b", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8999_CWE_590() {\n char local[8];\n local[0] = 0;\n free(local);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-590\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "cpp-00753-3d15863fd9aacfd4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_753_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00753-3d15863fd9aacfd4", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_753_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-17191-f093d1b063345334", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_17191_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17191-f093d1b063345334", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_17191_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19753-0c3dcd31feec0f0a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_19753_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19753-0c3dcd31feec0f0a", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_19753_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17376-db2a02f781424361", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_17376_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17376-db2a02f781424361", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_17376_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-19543-ff906443a6b9cce2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19543CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19543-ff906443a6b9cce2", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19543CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-10071-859a83b2976c9590", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10071CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10071-859a83b2976c9590", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10071CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-15997-218e78c848123ff1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15997_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15997-218e78c848123ff1", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15997_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-16990-b3326137318a52ee", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16990_CWE_79(name):\n import html\n return '

' + html.escape(name) + '

'\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16990-b3326137318a52ee", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16990_CWE_79(name):\n import html\n return '

' + html.escape(name) + '

'\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-04698-3cd2c493cedc2492", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4698CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04698-3cd2c493cedc2492", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4698CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-11962-6f3fb18ac0d4d359", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_11962_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11962-6f3fb18ac0d4d359", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_11962_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11040-5d9828862ff70583", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11040CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11040-5d9828862ff70583", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11040CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02847-0749a0476f63f3af", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2847_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02847-0749a0476f63f3af", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2847_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-18684-f30767c8bc35e469", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18684CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18684-f30767c8bc35e469", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18684CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-10066-c7f98bc5f4a5f670", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10066CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10066-c7f98bc5f4a5f670", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10066CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08351-496fd423ce0e1375", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8351CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08351-496fd423ce0e1375", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8351CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-02444-6351f47f15d8c3a6", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2444_CWE_502(blob):\n import json, pickle\n return pickle.loads(blob) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02444-6351f47f15d8c3a6", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2444_CWE_502(blob):\n import json, pickle\n return pickle.loads(blob) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-06915-c8d65c3b4854e649", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6915_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06915-c8d65c3b4854e649", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6915_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-13323-787165db5021f625", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13323CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13323-787165db5021f625", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13323CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-14860-38ecee9799050daf", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14860CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14860-38ecee9799050daf", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14860CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09558-1406bc84a4cb2628", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9558CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09558-1406bc84a4cb2628", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9558CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-12920-b2122ec315331858", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12920_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12920-b2122ec315331858", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12920_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-14624-3049db65ae629052", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14624CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14624-3049db65ae629052", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14624CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-03336-1e0cb47dd7ce771b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3336CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03336-1e0cb47dd7ce771b", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3336CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-17438-2ab7673d0fef389d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17438CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17438-2ab7673d0fef389d", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17438CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09706-cb36022c5d259a83", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9706CWE863(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09706-cb36022c5d259a83", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9706CWE863(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-00920-4809e899795f3eab", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_920_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00920-4809e899795f3eab", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_920_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-02751-2cfbe8e8382f8d71", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2751CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02751-2cfbe8e8382f8d71", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2751CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-06641-c0ebb539bfa2823f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6641CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06641-c0ebb539bfa2823f", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6641CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-01021-8c04bd321cda3534", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1021CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01021-8c04bd321cda3534", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1021CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-12461-7986b5d8912f9cea", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12461CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12461-7986b5d8912f9cea", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12461CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09145-97bf8c2dd9db44fc", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9145CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09145-97bf8c2dd9db44fc", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9145CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-17082-33d28cb5f96930d1", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17082_CWE_352(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17082-33d28cb5f96930d1", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17082_CWE_352(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-16181-22084a587615aa5e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16181CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16181-22084a587615aa5e", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16181CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-04198-c9351ab00b2f73ae", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_4198_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04198-c9351ab00b2f73ae", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_4198_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[10]}<|im_end|>\n"} {"id": "javascript-05396-23908ae719e22e90", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5396CWE601(next) {\n return next;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05396-23908ae719e22e90", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5396CWE601(next) {\n return next;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-16038-5a745f2646b7fadd", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16038CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16038-5a745f2646b7fadd", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16038CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07758-38d035644cbc385b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7758_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07758-38d035644cbc385b", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7758_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-16954-436ecf66d3dc358f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16954CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16954-436ecf66d3dc358f", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16954CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07015-fae583333cf229a0", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_7015_CWE_190(int count) {\n int bytes = count * 70;\n int bytes = count * 70;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07015-fae583333cf229a0", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_7015_CWE_190(int count) {\n int bytes = count * 70;\n int bytes = count * 70;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "javascript-13345-72bf2f8d777d65a9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13345CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13345-72bf2f8d777d65a9", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13345CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13686-1be9242fe539c96b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_13686_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13686-1be9242fe539c96b", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_13686_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17953-6c2509bf9a34832b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17953CWE862(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17953-6c2509bf9a34832b", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17953CWE862(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-19665-3220e911f6095750", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19665CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19665-3220e911f6095750", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19665CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-09198-daa10b31ad15771b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9198_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09198-daa10b31ad15771b", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9198_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-14988-b9bba2013eb57f99", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14988CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14988-b9bba2013eb57f99", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14988CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-15364-4fafc73e98ceb36c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15364_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15364-4fafc73e98ceb36c", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15364_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-10516-f497b6aaaf7013b8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10516_CWE_416(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10516-f497b6aaaf7013b8", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10516_CWE_416(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-15196-e5934b6f99788caa", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_15196_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15196-e5934b6f99788caa", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_15196_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-15529-ef21b2addf883e34", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_15529_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15529-ef21b2addf883e34", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_15529_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-00956-9549fd975af2ce6f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_956_CWE_601(next_url):\n return next_url #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00956-9549fd975af2ce6f", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_956_CWE_601(next_url):\n return next_url #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-17396-cd3ec96a1244512c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_17396_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17396-cd3ec96a1244512c", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_17396_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-10801-a3fbf32ded50fd93", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10801CWE918(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10801-a3fbf32ded50fd93", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10801CWE918(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-06714-5f164c9974a94708", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_6714_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06714-5f164c9974a94708", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_6714_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-15721-91ec0a1c2ffb20c4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_15721_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15721-91ec0a1c2ffb20c4", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_15721_CWE_918(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-05672-7a85ce72d6189d6b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5672CWE352(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05672-7a85ce72d6189d6b", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5672CWE352(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-18732-5abd1d51de6a88e1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_18732_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18732-5abd1d51de6a88e1", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_18732_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17928-3a210f69e722ed63", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17928_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17928-3a210f69e722ed63", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17928_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-10384-44e15c8e59c1685d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10384_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10384-44e15c8e59c1685d", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10384_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12050-55a434d25365025e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12050CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12050-55a434d25365025e", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12050CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19380-a54b3532b99cae92", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_19380_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19380-a54b3532b99cae92", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_19380_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04304-eec4827e31daf5bf", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4304CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04304-eec4827e31daf5bf", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4304CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-00281-43135177a82fa031", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle281CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00281-43135177a82fa031", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle281CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-06047-25ba7fdee38d3512", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6047CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06047-25ba7fdee38d3512", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6047CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-17947-d7ebb23d8ca6c16c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17947_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17947-d7ebb23d8ca6c16c", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17947_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19762-2c80b45cfff7fd6c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_19762_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19762-2c80b45cfff7fd6c", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_19762_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-15616-b96b6c0e1c072a97", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_15616_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15616-b96b6c0e1c072a97", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_15616_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-00794-fba5694f10846046", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle794CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00794-fba5694f10846046", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle794CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-18701-dae8b9e8e2f7eb35", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_18701_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18701-dae8b9e8e2f7eb35", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_18701_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-06863-f8ea56d7933be899", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6863CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06863-f8ea56d7933be899", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6863CWE639(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-12025-6844b228bf9b28d0", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12025_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12025-6844b228bf9b28d0", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12025_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-00172-25b4cc4babbec24c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample172CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00172-25b4cc4babbec24c", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample172CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-18333-577a0667399f7467", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_18333_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18333-577a0667399f7467", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_18333_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-06865-bac420ccb800598e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_6865_CWE_190(int count) {\n int bytes = count * 50;\n int bytes = count * 50;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06865-bac420ccb800598e", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_6865_CWE_190(int count) {\n int bytes = count * 50;\n int bytes = count * 50;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "c-05244-a688ca849e562668", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_5244_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05244-a688ca849e562668", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_5244_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-16889-9005bd43d5b00d30", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16889CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16889-9005bd43d5b00d30", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16889CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-11452-ad62a22aec9b4cdc", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11452CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11452-ad62a22aec9b4cdc", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11452CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-19752-71ae7513ddeecd3c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19752CWE352(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19752-71ae7513ddeecd3c", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19752CWE352(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-10751-85cce83d7c998797", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_10751_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10751-85cce83d7c998797", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_10751_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15272-a230cb9cab54ce99", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15272CWE77(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15272-a230cb9cab54ce99", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15272CWE77(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-08554-5d6bf6a2610c3c4c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8554_CWE_787(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08554-5d6bf6a2610c3c4c", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8554_CWE_787(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-15186-449f3eef23a597f3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_15186_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15186-449f3eef23a597f3", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_15186_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-18980-85754051716cb4cb", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18980_CWE_120(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18980-85754051716cb4cb", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18980_CWE_120(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19251-0dbaf82ca9ccf7e0", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_19251_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19251-0dbaf82ca9ccf7e0", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_19251_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12514-e0ccb60df30172d2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_12514_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12514-e0ccb60df30172d2", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_12514_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-12108-6c2e7f4d953636fc", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12108_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12108-6c2e7f4d953636fc", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12108_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-11806-2214765e662bc92b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11806_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11806-2214765e662bc92b", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11806_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03266-f1ecee871b139736", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3266_CWE_601(next_url):\n return next_url #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03266-f1ecee871b139736", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3266_CWE_601(next_url):\n return next_url #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-07848-0b7d4ca1e43f8127", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7848CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07848-0b7d4ca1e43f8127", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7848CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-09518-df4d7756e627f9a6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9518CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09518-df4d7756e627f9a6", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9518CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-07739-25f18d87bbcf2d1a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_7739_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07739-25f18d87bbcf2d1a", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_7739_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "c-09865-33325308ab9dd1c1", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_9865_CWE_190(int count) {\n int bytes = count * 76;\n int bytes = count * 76;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09865-33325308ab9dd1c1", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_9865_CWE_190(int count) {\n int bytes = count * 76;\n int bytes = count * 76;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "c-10188-9325f654097d5594", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10188_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10188-9325f654097d5594", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10188_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-15554-e057f02a74f076d1", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15554_CWE_787(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15554-e057f02a74f076d1", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15554_CWE_787(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05262-b2cfaf5c9983f160", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5262_CWE_476(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05262-b2cfaf5c9983f160", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5262_CWE_476(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-08940-402b14f0dda7d08b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8940CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08940-402b14f0dda7d08b", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8940CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-17081-85f4f589cfc1a341", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17081CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17081-85f4f589cfc1a341", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17081CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-08106-c2196eff70ae5bbe", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8106_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08106-c2196eff70ae5bbe", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_8106_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-09027-79a44c2510055811", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9027CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09027-79a44c2510055811", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9027CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-04756-15009b66977c405d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_4756_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04756-15009b66977c405d", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_4756_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-13541-cc15ce55cc93f395", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13541CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13541-cc15ce55cc93f395", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13541CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00821-d78035351b1ec921", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_821_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00821-d78035351b1ec921", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_821_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-10092-f3d9c43913d7fe8b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10092_CWE_352(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10092-f3d9c43913d7fe8b", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10092_CWE_352(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-11710-2b4992d1b9cfb24a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_11710_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11710-2b4992d1b9cfb24a", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_11710_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-19307-bf62cb1f987bd329", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19307_CWE_125(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19307-bf62cb1f987bd329", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19307_CWE_125(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-09116-1e6fc81eaaa45093", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9116CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next;\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09116-1e6fc81eaaa45093", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9116CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next;\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-05734-d3d289f2bcfa61d1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5734_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05734-d3d289f2bcfa61d1", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5734_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "java-11831-c83aa6f687e1b369", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11831CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11831-c83aa6f687e1b369", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11831CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07462-f01c61f6209982aa", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7462_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07462-f01c61f6209982aa", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7462_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-12670-00d05b6a74665e17", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12670_CWE_79(name):\n import html\n return '

' + html.escape(name) + '

'\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12670-00d05b6a74665e17", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12670_CWE_79(name):\n import html\n return '

' + html.escape(name) + '

'\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-09636-1fed4013dc5bef0d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9636_CWE_416(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09636-1fed4013dc5bef0d", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9636_CWE_416(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-08748-7c75520781de0c0d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_8748_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08748-7c75520781de0c0d", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_8748_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-08653-0ad8010f6e6e14ee", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8653CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08653-0ad8010f6e6e14ee", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8653CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-16458-56d03ae0c26f8f5e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16458CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16458-56d03ae0c26f8f5e", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16458CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03517-60d496735a696baa", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3517_CWE_125(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03517-60d496735a696baa", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3517_CWE_125(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-03437-d918ecb27dd39bf8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_3437_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03437-d918ecb27dd39bf8", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_3437_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-12478-6764483d163d5d80", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12478_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12478-6764483d163d5d80", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12478_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-00120-f1c38a040c9239bf", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_120_CWE_79(name):\n import html\n return '

' + name + '

' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00120-f1c38a040c9239bf", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_120_CWE_79(name):\n import html\n return '

' + name + '

' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-13375-e20092d6ae3e5094", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13375_CWE_122(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13375-e20092d6ae3e5094", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13375_CWE_122(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-15478-e379ce62cb3ebf59", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_15478_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15478-e379ce62cb3ebf59", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_15478_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-01797-af400dfa14ebb35a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1797CWE798() {\n return 'hardcoded-token';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-01797-af400dfa14ebb35a", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1797CWE798() {\n return 'hardcoded-token';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-09061-82063bb37057a71c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9061_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09061-82063bb37057a71c", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9061_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-15705-2ce2ad4f75ffc127", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15705CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15705-2ce2ad4f75ffc127", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15705CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04647-42c79447b1459373", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4647_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04647-42c79447b1459373", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4647_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-05804-82329afc2e387d4d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_5804_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05804-82329afc2e387d4d", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_5804_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-07900-e5d62cc60a56046d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7900_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07900-e5d62cc60a56046d", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7900_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "cpp-17264-3f944df834e3c5f1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17264_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17264-3f944df834e3c5f1", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17264_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-13343-d3e4d7867439fc24", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13343CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13343-d3e4d7867439fc24", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13343CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-15952-cc0811634dcdf5a5", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_15952_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15952-cc0811634dcdf5a5", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_15952_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07498-58e72e0c4a0b136f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7498_CWE_295(url):\n import requests\n return requests.get(url, verify=False, timeout=2) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07498-58e72e0c4a0b136f", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7498_CWE_295(url):\n import requests\n return requests.get(url, verify=False, timeout=2) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-05304-9b07cb8b99194328", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5304CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05304-9b07cb8b99194328", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5304CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-02859-87520a966075fa39", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_2859_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02859-87520a966075fa39", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_2859_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-02276-47b7cbc356056ddd", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_2276_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02276-47b7cbc356056ddd", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_2276_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-08241-bb5b9fd91e9f0fd8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8241CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08241-bb5b9fd91e9f0fd8", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8241CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-12061-6a4b7a54dba5c6ea", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12061CWE918(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12061-6a4b7a54dba5c6ea", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12061CWE918(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-05301-213c8900b77557d5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_5301_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05301-213c8900b77557d5", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_5301_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-10568-db602f2c33e7d777", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10568CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10568-db602f2c33e7d777", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10568CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-14545-7dc5bb8181c84882", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14545_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14545-7dc5bb8181c84882", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14545_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-14193-6a5cb2433c82c276", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14193CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14193-6a5cb2433c82c276", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14193CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-03638-a320c3170e5b909b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3638_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03638-a320c3170e5b909b", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3638_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "python-19182-96f4aa40d60a90e5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19182_CWE_352(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19182-96f4aa40d60a90e5", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19182_CWE_352(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-00869-a2cc050f2e209e4c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_869_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00869-a2cc050f2e209e4c", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_869_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "python-13454-9ed53a7e29051bd8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13454_CWE_787(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13454-9ed53a7e29051bd8", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13454_CWE_787(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-05389-c71a36572e9cc242", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_5389_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05389-c71a36572e9cc242", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_5389_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-18273-86db491ec0a0e9c4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18273CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18273-86db491ec0a0e9c4", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18273CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04277-8f4ffecaa1b03f2f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4277_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04277-8f4ffecaa1b03f2f", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4277_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-02314-ae85f620aa83a8b9", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2314_CWE_787(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02314-ae85f620aa83a8b9", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2314_CWE_787(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-17947-bc65f6f8a59fa5ab", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17947CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17947-bc65f6f8a59fa5ab", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17947CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05337-c8c1d88e377ecebb", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5337_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05337-c8c1d88e377ecebb", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5337_CWE_798():\n import os\n return 'sk_test_hardcoded_secret' #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-02323-839b86cb69b86aa4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2323CWE121(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02323-839b86cb69b86aa4", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2323CWE121(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-09143-cdc61a7e958b0e02", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9143_CWE_639(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09143-cdc61a7e958b0e02", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9143_CWE_639(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-00944-cc269cbe229bbe70", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_944_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00944-cc269cbe229bbe70", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_944_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-14325-6825f652143d39d8", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14325CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14325-6825f652143d39d8", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14325CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-16315-1c6a82efcee279a0", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16315_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16315-1c6a82efcee279a0", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16315_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-19042-97205c8700d407eb", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19042CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19042-97205c8700d407eb", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19042CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12732-2063dbdf31a2c5bd", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12732CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12732-2063dbdf31a2c5bd", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12732CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04418-85543b7c7d1e4516", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4418_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04418-85543b7c7d1e4516", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4418_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-16829-4f789a0cf196fb97", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16829_CWE_200(user):\n return {'id': user.id}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16829-4f789a0cf196fb97", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16829_CWE_200(user):\n return {'id': user.id}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09584-f7ed163171d5e3ca", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9584CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09584-f7ed163171d5e3ca", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9584CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-02245-3fb9304242da5b9b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2245_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02245-3fb9304242da5b9b", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2245_CWE_400(n):\n n = int(n) #\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-01499-9c33018be008bf03", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_1499_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01499-9c33018be008bf03", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_1499_CWE_704(Base *b) {\n ((Admin*)b)->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-704\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "python-19217-7ba75156edae876d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19217_CWE_125(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19217-7ba75156edae876d", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19217_CWE_125(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-09971-9572678356c807d5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_9971_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09971-9572678356c807d5", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_9971_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-05559-39ea91c4ee9ed998", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5559CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05559-39ea91c4ee9ed998", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5559CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-15403-cced9a4b0db49e6c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_15403_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15403-cced9a4b0db49e6c", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_15403_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-19272-a5caea51d203e76b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19272CWE352(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19272-a5caea51d203e76b", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19272CWE352(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-18795-0fa03e9840557a8d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18795_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18795-0fa03e9840557a8d", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18795_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-03123-e8f9fb4285e116e2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_3123_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03123-e8f9fb4285e116e2", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_3123_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-14703-79c6ef2e34e597ec", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_14703_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14703-79c6ef2e34e597ec", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_14703_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-15172-9d8dbf1daadebf54", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15172_CWE_476(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15172-9d8dbf1daadebf54", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15172_CWE_476(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-13049-18ff240560279a45", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_13049_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13049-18ff240560279a45", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_13049_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02799-3d5ee7bbc4154008", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_2799_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02799-3d5ee7bbc4154008", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_2799_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-18605-5c1964b5afe3f890", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_18605_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 34;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18605-5c1964b5afe3f890", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_18605_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 34;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-07651-5ef8e9f6b04dcf23", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_7651_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07651-5ef8e9f6b04dcf23", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_7651_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-16826-c162108a45ee9358", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16826CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16826-c162108a45ee9358", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16826CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08531-32476498466cd9b0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8531CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08531-32476498466cd9b0", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8531CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-05807-87e2ae5b5d8c487d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5807_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05807-87e2ae5b5d8c487d", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5807_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-19466-de76eb9664da77ee", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_19466_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19466-de76eb9664da77ee", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_19466_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08646-0281486d8c850f3c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8646CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08646-0281486d8c850f3c", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8646CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-05865-c1e23e8545dc310b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5865CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05865-c1e23e8545dc310b", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5865CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-09034-1a5f049e60848ad6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9034CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09034-1a5f049e60848ad6", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9034CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-02608-056003120741435f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2608CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02608-056003120741435f", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2608CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-00958-b88c1aafb5de5a81", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle958CWE915(target, body) {\n return Object.assign(target, body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00958-b88c1aafb5de5a81", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle958CWE915(target, body) {\n return Object.assign(target, body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-10230-0a502e90a4b3e56a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_10230_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10230-0a502e90a4b3e56a", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_10230_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-00964-2e2fcda8a29f9691", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle964CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00964-2e2fcda8a29f9691", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle964CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-04968-a0cd70a45fbbf269", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4968CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04968-a0cd70a45fbbf269", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4968CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-07308-a0f1ee535a5e8bef", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7308CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07308-a0f1ee535a5e8bef", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7308CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-16451-8bed0267d58b9872", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16451CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16451-8bed0267d58b9872", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16451CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-00773-4a65e3e107edd4f3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_773_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00773-4a65e3e107edd4f3", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_773_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-16152-d389841e28d7662c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_16152_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16152-d389841e28d7662c", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_16152_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09329-b61a652ae78be2ef", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9329CWE1321(obj, key, value) {\n obj[key] = value;\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-1321\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09329-b61a652ae78be2ef", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9329CWE1321(obj, key, value) {\n obj[key] = value;\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-1321\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-07882-8c3b31a590dfea7a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7882_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07882-8c3b31a590dfea7a", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7882_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "javascript-16757-2f9de2f17d03f097", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16757CWE125(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16757-2f9de2f17d03f097", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16757CWE125(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12973-7f5cd133156b6cc9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12973CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12973-7f5cd133156b6cc9", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12973CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-17438-e2af479cae1b79bb", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17438_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17438-e2af479cae1b79bb", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17438_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-14076-a38227f6ab116004", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14076_CWE_601(next_url):\n return '/home' if not next_url.startswith('/') else next_url\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14076-a38227f6ab116004", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14076_CWE_601(next_url):\n return '/home' if not next_url.startswith('/') else next_url\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00482-1f3679d27b3d95ff", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_482_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00482-1f3679d27b3d95ff", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_482_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-13044-0d14cbbc8c8f330f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13044CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13044-0d14cbbc8c8f330f", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13044CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-18989-c42212665d142817", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_18989_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18989-c42212665d142817", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_18989_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-06063-788b444f0632a387", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6063CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06063-788b444f0632a387", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6063CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-16708-e48dc48ccc507d25", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16708CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16708-e48dc48ccc507d25", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16708CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13456-c4d59322677304cd", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13456_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13456-c4d59322677304cd", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13456_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-17129-65164e9c6ff1edbe", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17129_CWE_200(user):\n return {'id': user.id}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17129-65164e9c6ff1edbe", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17129_CWE_200(user):\n return {'id': user.id}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-00198-3b4336265fe3c297", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample198CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00198-3b4336265fe3c297", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample198CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-15947-dd3556f04caf3ff3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_15947_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15947-dd3556f04caf3ff3", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_15947_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13660-7f50808b7165f6b2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13660CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13660-7f50808b7165f6b2", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13660CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-13752-81677e341b8d30ae", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13752_CWE_352(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13752-81677e341b8d30ae", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13752_CWE_352(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-16744-2e77eecb0a1900e4", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16744_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16744-2e77eecb0a1900e4", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16744_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16575-099b69e099b3cc24", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16575CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16575-099b69e099b3cc24", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16575CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03088-445dd1ebe5c2f1c8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3088_CWE_295(url):\n import requests\n return requests.get(url, verify=False, timeout=2) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03088-445dd1ebe5c2f1c8", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3088_CWE_295(url):\n import requests\n return requests.get(url, verify=False, timeout=2) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-14335-e7f19bebaea08731", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14335_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14335-e7f19bebaea08731", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14335_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04648-1bc84689f8029636", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4648_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04648-1bc84689f8029636", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4648_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "c-07434-a47cc1ab4bf48f01", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_7434_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07434-a47cc1ab4bf48f01", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_7434_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-00564-43a957c2673a4a94", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle564CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00564-43a957c2673a4a94", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle564CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-14855-716f14f774cddfda", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_14855_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 14;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14855-716f14f774cddfda", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_14855_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 14;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-04816-b9e815175b92c796", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4816_CWE_863(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04816-b9e815175b92c796", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4816_CWE_863(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-10386-938867864ac9953e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10386CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10386-938867864ac9953e", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10386CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11516-60cbcc3758167a19", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11516CWE863(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11516-60cbcc3758167a19", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11516CWE863(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-09903-621e1730df5e9ccb", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9903_CWE_862(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09903-621e1730df5e9ccb", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9903_CWE_862(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-16407-9b531824857002df", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_16407_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16407-9b531824857002df", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_16407_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-02916-cdc3b27cd87595e1", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2916CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02916-cdc3b27cd87595e1", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2916CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-10959-d0476f86bf7d7ed5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_10959_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10959-d0476f86bf7d7ed5", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_10959_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-17344-3bc4d4a0e2b42d38", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_17344_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17344-3bc4d4a0e2b42d38", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_17344_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-01875-55d40fe4c04a2195", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1875_CWE_122(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01875-55d40fe4c04a2195", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1875_CWE_122(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-14900-26d8cf9554a3df26", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14900CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14900-26d8cf9554a3df26", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14900CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-06554-02d6d08cbe296a42", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_6554_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06554-02d6d08cbe296a42", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_6554_CWE_502(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-13700-9c7d8995d4099fdb", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13700_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13700-9c7d8995d4099fdb", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13700_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-00229-0482c847e69dd3e2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample229CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00229-0482c847e69dd3e2", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample229CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-15669-d33c3050c9e36052", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_15669_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15669-d33c3050c9e36052", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_15669_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13119-97472a165aede26e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13119CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13119-97472a165aede26e", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13119CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05901-e96d153c36c08ce6", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5901_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05901-e96d153c36c08ce6", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5901_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-17685-3e1587cb633d873c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17685_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17685-3e1587cb633d873c", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_17685_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-06964-317438b3c2c0aa36", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6964_CWE_787(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06964-317438b3c2c0aa36", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6964_CWE_787(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-10317-ee2661851b77f0da", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10317_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10317-ee2661851b77f0da", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10317_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-14363-79afbd55a77d5c60", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14363CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14363-79afbd55a77d5c60", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14363CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-00686-4369ba3792a41b11", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_686_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00686-4369ba3792a41b11", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_686_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-09283-6025d1da0993b79e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9283CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09283-6025d1da0993b79e", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9283CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-19257-237658c80c0e21f1", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19257_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19257-237658c80c0e21f1", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19257_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18468-c5b0d23fdcc68c6c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18468CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18468-c5b0d23fdcc68c6c", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18468CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-04034-90bdb40f189a3b02", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4034CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04034-90bdb40f189a3b02", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4034CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-14529-f87d8a24672cdd4a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_14529_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14529-f87d8a24672cdd4a", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_14529_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-18693-fba73013c8b907fe", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_18693_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18693-fba73013c8b907fe", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_18693_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01797-edac2220b17ca3af", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1797_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01797-edac2220b17ca3af", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1797_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "cpp-10729-a58e61987f493315", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_10729_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10729-a58e61987f493315", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_10729_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01793-003c20c81898d08f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_1793_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01793-003c20c81898d08f", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_1793_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-13487-698ef1b56e315e34", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13487CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13487-698ef1b56e315e34", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13487CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-19019-34d380903e25f3d9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19019CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19019-34d380903e25f3d9", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19019CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-17580-845618106640e6b2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17580CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17580-845618106640e6b2", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17580CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-17384-75f5b0d64f966bec", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17384CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17384-75f5b0d64f966bec", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17384CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19836-6cfe0b9f606c8f96", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_19836_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19836-6cfe0b9f606c8f96", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nunsigned handle_19836_CWE_191(unsigned credits, unsigned cost) {\n if (credits < cost) return 0;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07526-f6a40bee13e08f6f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7526_CWE_601(next_url):\n return next_url #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07526-f6a40bee13e08f6f", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7526_CWE_601(next_url):\n return next_url #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-13852-382f658987cd62c2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13852CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13852-382f658987cd62c2", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13852CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15209-732b65ab43dca79c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15209CWE200(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15209-732b65ab43dca79c", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15209CWE200(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11169-3fd1ac28300678c7", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11169CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11169-3fd1ac28300678c7", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11169CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-17932-18632a1fd6f7dfd6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17932CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17932-18632a1fd6f7dfd6", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17932CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-03818-fed912c385cbb71d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3818CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03818-fed912c385cbb71d", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3818CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-11835-0190bbfe67c94123", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11835_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11835-0190bbfe67c94123", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11835_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-17373-90c14862bdbdc95d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_17373_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17373-90c14862bdbdc95d", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_17373_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-17142-04093e8f34685868", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_17142_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17142-04093e8f34685868", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_17142_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-16359-9a4d595c3d59405b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16359_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16359-9a4d595c3d59405b", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16359_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02145-8904cf45de5e0d3a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2145_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02145-8904cf45de5e0d3a", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2145_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "cpp-16484-24cbd4d1c796f90c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16484_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16484-24cbd4d1c796f90c", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16484_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16843-59e587b05d77da40", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16843CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16843-59e587b05d77da40", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16843CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-06472-9095a47c024fc2c1", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6472CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06472-9095a47c024fc2c1", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6472CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-14802-7aa0840a1f400336", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_14802_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14802-7aa0840a1f400336", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_14802_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-03327-800c3258d39ca313", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3327_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03327-800c3258d39ca313", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3327_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) return;\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-401\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "c-15388-6c4d584d2f343e9d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_15388_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15388-6c4d584d2f343e9d", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_15388_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12551-a799733123c82b26", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_12551_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12551-a799733123c82b26", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_12551_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-10659-85e9ba6b603d8e6e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10659_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10659-85e9ba6b603d8e6e", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10659_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-03725-89e346d3bae6fbf5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3725CWE22(name) {\n return fs.readFileSync('/srv/data/' + name);\n return fs.readFileSync('/srv/data/' + name);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03725-89e346d3bae6fbf5", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3725CWE22(name) {\n return fs.readFileSync('/srv/data/' + name);\n return fs.readFileSync('/srv/data/' + name);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-16460-98ea59cd71b65bb9", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16460_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16460-98ea59cd71b65bb9", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16460_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-09757-732ecd8d576b135e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9757_CWE_125(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09757-732ecd8d576b135e", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9757_CWE_125(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-09479-b99a0de0b4d204aa", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9479CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09479-b99a0de0b4d204aa", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9479CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-15051-7968645d8881372d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15051CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15051-7968645d8881372d", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15051CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-11017-ad69b252996dde17", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11017CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11017-ad69b252996dde17", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11017CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12980-09f02f0b583a32f7", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12980_CWE_120(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12980-09f02f0b583a32f7", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12980_CWE_120(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07024-3b96944b5e97ee80", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7024_CWE_787(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07024-3b96944b5e97ee80", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7024_CWE_787(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-07992-d81be0b8ce298dcb", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7992CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07992-d81be0b8ce298dcb", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7992CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-05176-78b8f6c48eb702ed", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_5176_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05176-78b8f6c48eb702ed", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_5176_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-08327-bbec564c71de8fd1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_8327_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-08327-bbec564c71de8fd1", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_8327_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-18514-e14d855564fa843f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_18514_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18514-e14d855564fa843f", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_18514_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13057-85dd0d27072fd55c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13057_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13057-85dd0d27072fd55c", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13057_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-00986-83d5c742c11cb05b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle986CWE601(next) {\n return next;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00986-83d5c742c11cb05b", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle986CWE601(next) {\n return next;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-10512-1310a7181626f2cd", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10512CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10512-1310a7181626f2cd", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10512CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-16917-c2701f2f17f994b2", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_16917_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16917-c2701f2f17f994b2", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_16917_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-06260-34885f4cde88467a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6260_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06260-34885f4cde88467a", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6260_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-10575-fd96d1544807f88b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10575CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10575-fd96d1544807f88b", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10575CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-17599-76ce0faa409f4ca1", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_17599_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17599-76ce0faa409f4ca1", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_17599_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05390-0e3b4c14908f7da0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5390_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05390-0e3b4c14908f7da0", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5390_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-04901-e64e2996a280018c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4901CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-04901-e64e2996a280018c", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle4901CWE434(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-16036-10425176e4aa12c2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16036CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16036-10425176e4aa12c2", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16036CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12999-999b4839b2f7ab3b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_12999_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12999-999b4839b2f7ab3b", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_12999_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15699-2c831f4aa97a43b3", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15699CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15699-2c831f4aa97a43b3", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15699CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15171-b711569e4c6d93ef", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15171CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15171-b711569e4c6d93ef", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15171CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-08839-8c0afc161ffecbb9", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8839_CWE_200(user):\n return user.__dict__ #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08839-8c0afc161ffecbb9", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8839_CWE_200(user):\n return user.__dict__ #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-13058-2834edf6af800da4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13058_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13058-2834edf6af800da4", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13058_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-18424-d267ed1db050410c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18424_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18424-d267ed1db050410c", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18424_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-17363-62919e30361741a3", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17363_CWE_121(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17363-62919e30361741a3", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17363_CWE_121(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04145-191579e5f39a9476", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4145_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04145-191579e5f39a9476", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4145_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "java-07784-9da4bf1e8ee8d50f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7784CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07784-9da4bf1e8ee8d50f", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7784CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-12094-7715872ca009e43e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12094CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12094-7715872ca009e43e", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12094CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07232-d0fd36eb72d13b9b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_7232_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07232-d0fd36eb72d13b9b", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-352\nint handle_7232_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-06470-57b76a548be95bd8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6470CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06470-57b76a548be95bd8", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6470CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-01210-92ada10d084dc8c9", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1210_CWE_120(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01210-92ada10d084dc8c9", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1210_CWE_120(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-10435-e205448f27814056", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10435CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10435-e205448f27814056", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10435CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-19178-c2b1730500c710b1", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19178CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19178-c2b1730500c710b1", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19178CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-02205-ab020fe1c23e2434", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2205_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02205-ab020fe1c23e2434", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2205_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "cpp-11559-2fd046f1a9cf79c0", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_11559_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect type conversion", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11559-2fd046f1a9cf79c0", "template_cwe": "CWE-704"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nclass Base { public: virtual ~Base(){} };\nclass Admin : public Base { public: void run(){} };\nvoid handle_11559_CWE_704(Base *b) {\n if (Admin *a = dynamic_cast(b)) a->run();\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-07727-aa81819150132085", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_7727_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07727-aa81819150132085", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_7727_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-08779-14a683164a0f8562", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8779CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08779-14a683164a0f8562", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8779CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-15286-c7137c8dc3015ed5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15286_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15286-c7137c8dc3015ed5", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_15286_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02401-28b4ab2272f7bf05", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2401_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02401-28b4ab2272f7bf05", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2401_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-12360-b07303879bea7c0d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12360_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12360-b07303879bea7c0d", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12360_CWE_306(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-09664-15a9027a9cb1ba83", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9664_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09664-15a9027a9cb1ba83", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9664_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "java-07380-65ae1f6b4581263d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7380CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07380-65ae1f6b4581263d", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7380CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-13308-906cd1a9e95154f9", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13308_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13308-906cd1a9e95154f9", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13308_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04958-1e74c7a8bcba145b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4958_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04958-1e74c7a8bcba145b", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4958_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "cpp-13788-22d6008d0fdc418d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13788_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13788-22d6008d0fdc418d", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13788_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04630-9a17baa60e5bc317", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4630_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04630-9a17baa60e5bc317", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4630_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "javascript-18063-dcdc6ab74d0cce33", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18063CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18063-dcdc6ab74d0cce33", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18063CWE639(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-10813-38fbfedabae5f186", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_10813_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10813-38fbfedabae5f186", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_10813_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-06298-995018e460404678", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6298_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06298-995018e460404678", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_6298_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "python-12982-6cee893b58f12b87", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12982_CWE_476(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12982-6cee893b58f12b87", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12982_CWE_476(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07751-efffc30ef33d9798", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_7751_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07751-efffc30ef33d9798", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_7751_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-19137-7d9701102a613494", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19137CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19137-7d9701102a613494", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19137CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07502-a9c75b1b567b02ef", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7502CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07502-a9c75b1b567b02ef", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7502CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-03456-efc6b8e9bb2566ef", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3456_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03456-efc6b8e9bb2566ef", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3456_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p[0] = 'A';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "python-13223-2c9554c4f01973e8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13223_CWE_121(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13223-2c9554c4f01973e8", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13223_CWE_121(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-14040-2f8dcb77db735af8", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14040CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14040-2f8dcb77db735af8", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14040CWE306(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07148-1b9985ec6d5f7e7e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7148_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07148-1b9985ec6d5f7e7e", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7148_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "javascript-10498-7d1154b31a014433", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10498CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10498-7d1154b31a014433", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10498CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19407-fe8cf00b3f94d2de", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_19407_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19407-fe8cf00b3f94d2de", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_19407_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04061-0b5a3cc9415c3a7a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_4061_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04061-0b5a3cc9415c3a7a", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_4061_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-10190-ea4eb1f7c0d20d2c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10190CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10190-ea4eb1f7c0d20d2c", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10190CWE120(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-05482-e5ad499bb7c0963b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5482_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05482-e5ad499bb7c0963b", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5482_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "javascript-05117-3d6a8fb62a9dd4e9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5117CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05117-3d6a8fb62a9dd4e9", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5117CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-03735-0a7561623f75d8d7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3735_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03735-0a7561623f75d8d7", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3735_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-19472-bf8e767aea43dd27", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19472CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19472-bf8e767aea43dd27", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19472CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-13448-c87d16ef7069fea2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13448_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13448-c87d16ef7069fea2", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_13448_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-02353-7d5f0275cd657647", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2353CWE121(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02353-7d5f0275cd657647", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2353CWE121(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-14698-1de7046f78b10758", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14698_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14698-1de7046f78b10758", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14698_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05590-e5e1cf24815234a3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5590CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05590-e5e1cf24815234a3", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5590CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-16593-dc69d18f1a519110", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_16593_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16593-dc69d18f1a519110", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_16593_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-06237-2af01ee5c952bcbb", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6237CWE798() {\n return 'hardcoded-token';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06237-2af01ee5c952bcbb", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6237CWE798() {\n return 'hardcoded-token';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-19176-55b55a975e7e847f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19176CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19176-55b55a975e7e847f", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19176CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-14807-09d87a205ee72962", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_14807_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14807-09d87a205ee72962", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_14807_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-07105-1dd962ff97e5e355", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_7105_CWE_190(int count) {\n int bytes = count * 49;\n int bytes = count * 49;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07105-1dd962ff97e5e355", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_7105_CWE_190(int count) {\n int bytes = count * 49;\n int bytes = count * 49;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "cpp-13020-c1e794107c776b1c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_13020_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13020-c1e794107c776b1c", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_13020_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08355-da0b8d0aab8d8378", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8355CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08355-da0b8d0aab8d8378", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8355CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-06388-5fe62221da980498", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6388CWE915(target, body) {\n return Object.assign(target, body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06388-5fe62221da980498", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6388CWE915(target, body) {\n return Object.assign(target, body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-14100-95327f954e98ae74", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_14100_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14100-95327f954e98ae74", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_14100_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08701-ed17531d67c38df8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8701CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08701-ed17531d67c38df8", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8701CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-14163-ac48ea636bba44cd", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_14163_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14163-ac48ea636bba44cd", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_14163_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-11719-e8552ff21604715e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_11719_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11719-e8552ff21604715e", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_11719_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04974-ab23ab4c6e486265", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_4974_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04974-ab23ab4c6e486265", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_4974_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-10612-294c237969582ce6", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_10612_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10612-294c237969582ce6", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_10612_CWE_476(int *p) {\n if (p == NULL) return -1;\n return *p;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-10833-232858c1d285142c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_10833_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10833-232858c1d285142c", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_10833_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07312-40d4b2d06ad461c8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7312_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07312-40d4b2d06ad461c8", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_7312_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-19358-b4bbc7f565b29b01", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19358CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19358-b4bbc7f565b29b01", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19358CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19701-057c686288a33b13", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_19701_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19701-057c686288a33b13", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_19701_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-00321-c51542a21dd663d6", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_321_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-00321-c51542a21dd663d6", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-918\nint handle_321_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-11034-d3b0dc4e74be2a3f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11034CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11034-d3b0dc4e74be2a3f", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11034CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08171-3b4e24346557dcc9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8171CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08171-3b4e24346557dcc9", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8171CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-03195-408e9578af1bb82e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3195_CWE_122(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03195-408e9578af1bb82e", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3195_CWE_122(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-04165-d351544c0f6618e9", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_4165_CWE_190(int count) {\n int bytes = count * 46;\n int bytes = count * 46;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04165-d351544c0f6618e9", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_4165_CWE_190(int count) {\n int bytes = count * 46;\n int bytes = count * 46;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "javascript-02710-c029391b688d9402", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2710CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02710-c029391b688d9402", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2710CWE120(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-13195-7a738c134cf46e82", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13195_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13195-7a738c134cf46e82", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13195_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-03945-99ab56182b84732e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3945_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-03945-99ab56182b84732e", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3945_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "java-09911-f60e60f4279a4093", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9911CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09911-f60e60f4279a4093", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9911CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-02824-b55b4909599884bc", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2824CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02824-b55b4909599884bc", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2824CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-17054-106e4dcb87447f68", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17054CWE787(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17054-106e4dcb87447f68", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17054CWE787(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12625-97b720d9348605da", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12625_CWE_122(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12625-97b720d9348605da", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12625_CWE_122(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-13604-cb629f69d0437d0b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13604CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13604-cb629f69d0437d0b", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13604CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07265-977869478f33a848", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7265_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07265-977869478f33a848", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7265_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-10130-b5df66311f6d257d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_10130_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10130-b5df66311f6d257d", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_10130_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-14087-936d67e3898bcf93", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14087_CWE_125(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14087-936d67e3898bcf93", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14087_CWE_125(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-14468-aff2e79bebfb71d2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14468CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14468-aff2e79bebfb71d2", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14468CWE915(target, body) {\n return Object.assign(Object.create(null), body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16487-d53a8dc6b1598588", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16487CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16487-d53a8dc6b1598588", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16487CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08660-acc9aec32e2c0ffe", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8660CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08660-acc9aec32e2c0ffe", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8660CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-14937-5aa0b6d1b6b6c97b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14937CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14937-5aa0b6d1b6b6c97b", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14937CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-17209-ae68889e1427812e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_17209_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-17209-ae68889e1427812e", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_17209_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17034-bdbd27ff9093384b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17034CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17034-bdbd27ff9093384b", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17034CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-08645-5c98d2bef5bab7bd", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8645_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08645-5c98d2bef5bab7bd", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8645_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-10209-563472b8f5e091ec", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10209_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10209-563472b8f5e091ec", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10209_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-11675-e474dd6cb52c7bc9", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11675_CWE_400(n):\n n = min(int(n), 1000)\n return ['x'] * n\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11675-e474dd6cb52c7bc9", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11675_CWE_400(n):\n n = min(int(n), 1000)\n return ['x'] * n\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04196-4e91e929252c46fd", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4196CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next;\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04196-4e91e929252c46fd", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4196CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next;\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-11797-492e30f97db4d7b6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11797CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11797-492e30f97db4d7b6", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11797CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return System.getenv(\"API_TOKEN\");\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-16454-48293c4225bcf76f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16454_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16454-48293c4225bcf76f", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16454_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-09661-a35e671fc2611c07", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9661_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09661-a35e671fc2611c07", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9661_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-02509-f71f1ca7c66ce85b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_2509_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02509-f71f1ca7c66ce85b", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_2509_CWE_200(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-10523-9587dcb1870611e3", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10523_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10523-9587dcb1870611e3", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_10523_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02711-b2913913cc38253c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_2711_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02711-b2913913cc38253c", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_2711_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-08859-8e6299e55a347b11", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_8859_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08859-8e6299e55a347b11", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_8859_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-08570-ba1f61d5a6fc6740", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8570_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08570-ba1f61d5a6fc6740", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8570_CWE_306(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-19906-2bf97279cd21c095", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19906_CWE_416(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19906-2bf97279cd21c095", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19906_CWE_416(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-00735-f2873982ff491bc4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle735CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00735-f2873982ff491bc4", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle735CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-16279-f91c49878fe8bfa2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_16279_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16279-f91c49878fe8bfa2", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-94\nint handle_16279_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-05610-97b5ed1359b67dd3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_5610_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05610-97b5ed1359b67dd3", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_5610_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-00731-2ed6fb61fefe656c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_731_CWE_434(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00731-2ed6fb61fefe656c", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_731_CWE_434(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-04838-0299023ac128cb04", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4838_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04838-0299023ac128cb04", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_4838_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-05968-4b3ad1a4e3451fa8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5968CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05968-4b3ad1a4e3451fa8", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5968CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return (h, s) -> true;\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-295\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-02508-e69ed9672c035d03", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_2508_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02508-e69ed9672c035d03", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_2508_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-13738-1a99e16b031f9a45", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_13738_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13738-1a99e16b031f9a45", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_13738_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01366-f36353d03716df9c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_1366_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01366-f36353d03716df9c", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_1366_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-05211-d6ac12819eb2467c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5211CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05211-d6ac12819eb2467c", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5211CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-19198-cc37310c1ec3c7e7", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19198_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19198-cc37310c1ec3c7e7", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19198_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02387-b5edcf11eae25958", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2387_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02387-b5edcf11eae25958", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2387_CWE_20(age):\n age = int(age)\n return int(age) #\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-03225-331bc17c1aaf3202", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3225CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03225-331bc17c1aaf3202", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3225CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-11666-c6184a1f1bed16d6", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11666_CWE_863(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11666-c6184a1f1bed16d6", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11666_CWE_863(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-03153-6d617e173d542fd0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3153CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03153-6d617e173d542fd0", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3153CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-16557-c0ed8c258bb84c3d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_16557_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16557-c0ed8c258bb84c3d", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_16557_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-14345-6c374ac403676ba2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_14345_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 29;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14345-6c374ac403676ba2", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_14345_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 29;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-00475-61a057a14df71228", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle475CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00475-61a057a14df71228", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle475CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-14480-0fe4eb9960f0fd24", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14480_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14480-0fe4eb9960f0fd24", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_14480_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19016-76c3396f3285a0ca", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_19016_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19016-76c3396f3285a0ca", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_19016_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-00490-197fe7b87971e923", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_490_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00490-197fe7b87971e923", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_490_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "cpp-10775-a087fd9810f31df4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_10775_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 39;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10775-a087fd9810f31df4", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_10775_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 39;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-14706-c83f23c0cc173c1e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14706CWE601(next) {\n return next.startsWith('/') ? next : '/';\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14706-c83f23c0cc173c1e", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14706CWE601(next) {\n return next.startsWith('/') ? next : '/';\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13360-75bfd25af7a1ba84", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13360CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13360-75bfd25af7a1ba84", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13360CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07407-40989a6c5bd9fa21", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7407CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07407-40989a6c5bd9fa21", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7407CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-14538-24aa9116dee32b06", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14538_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14538-24aa9116dee32b06", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14538_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-08267-6020bebf7f8b401e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_8267_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-08267-6020bebf7f8b401e", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-20\nint handle_8267_CWE_20(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-08350-1ed66c4962bf90b4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_8350_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-08350-1ed66c4962bf90b4", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_8350_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "javascript-02856-c4c261926cd3e7fc", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2856CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02856-c4c261926cd3e7fc", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2856CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-10631-c07029fca3da9f77", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10631CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10631-c07029fca3da9f77", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10631CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-10140-18b1321dbf14ce87", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_10140_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-10140-18b1321dbf14ce87", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_10140_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15576-dec75ae24b322c77", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15576CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15576-dec75ae24b322c77", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15576CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05161-9634dd5b54d1a8ef", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5161CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05161-9634dd5b54d1a8ef", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5161CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-12462-764b0c71ed2f1ca4", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_12462_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12462-764b0c71ed2f1ca4", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_12462_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-11479-83825aca6445cc36", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11479_CWE_94(expr):\n import ast\n return ast.literal_eval(expr)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-11479-83825aca6445cc36", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_11479_CWE_94(expr):\n import ast\n return ast.literal_eval(expr)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-19508-33f768a83803fc30", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19508CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19508-33f768a83803fc30", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19508CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-10079-f59a472748f4d6be", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10079CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10079-f59a472748f4d6be", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10079CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-06374-bc2ee4b90eba47cc", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6374CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06374-bc2ee4b90eba47cc", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6374CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-19924-138744669376b52d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19924CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19924-138744669376b52d", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19924CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02298-e33a1aef30054022", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_2298_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02298-e33a1aef30054022", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_2298_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-04973-f1f8c0776aabc823", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_4973_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04973-f1f8c0776aabc823", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_4973_CWE_639(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-17107-000fefc730692639", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17107_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Memory leak", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17107-000fefc730692639", "template_cwe": "CWE-401"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17107_CWE_401(int ok) {\n char *p = (char*)malloc(128);\n if (!p) return;\n if (!ok) { free(p); return; }\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01953-425ff18ab1a49637", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_1953_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01953-425ff18ab1a49637", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_1953_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-07726-299b9b161f66f97b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_7726_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07726-299b9b161f66f97b", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_7726_CWE_863(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-00059-7562992115ed2cd6", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_59_CWE_590() {\n char local[8];\n local[0] = 0;\n free(local);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-590\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00059-7562992115ed2cd6", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_59_CWE_590() {\n char local[8];\n local[0] = 0;\n free(local);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-590\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "javascript-11266-62971ce19c299d4e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11266CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11266-62971ce19c299d4e", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11266CWE416(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01175-fac2933dc101a0dd", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1175_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01175-fac2933dc101a0dd", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1175_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "python-04837-5b539000569a2fb0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4837_CWE_125(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04837-5b539000569a2fb0", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4837_CWE_125(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-00761-c6ae02cac64e9bc2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample761CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00761-c6ae02cac64e9bc2", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample761CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-07759-358502fa8193b9be", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7759CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07759-358502fa8193b9be", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7759CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-10348-a5ce5aa5a9813a0e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10348_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10348-a5ce5aa5a9813a0e", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10348_CWE_284(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-13421-db173063efe15d00", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13421CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13421-db173063efe15d00", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13421CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n ps = c.prepareStatement(\"select * from users where id=?\"); ps.setString(1, id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08570-319ca371eb807f5d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8570CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08570-319ca371eb807f5d", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8570CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-06581-0b32a9abb7312e18", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_6581_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-06581-0b32a9abb7312e18", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_6581_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-15265-fc8838d52f9cc1c5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15265CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15265-fc8838d52f9cc1c5", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15265CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-16692-8451a4e3f2f338bc", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16692_CWE_352(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-16692-8451a4e3f2f338bc", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_16692_CWE_352(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12109-b8b7f6a81bf2365f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12109CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12109-b8b7f6a81bf2365f", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12109CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02209-6f2e0c8c98f5c2a5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2209_CWE_200(user):\n return user.__dict__ #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02209-6f2e0c8c98f5c2a5", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2209_CWE_200(user):\n return user.__dict__ #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-19239-37b2ce68b7e67f71", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19239_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19239-37b2ce68b7e67f71", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19239_CWE_611(xml):\n from defusedxml import ElementTree\n return ElementTree.fromstring(xml)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-02988-53520ea69f011efe", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2988_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02988-53520ea69f011efe", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2988_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-12492-bc7da1b8b8810a1c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_12492_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12492-bc7da1b8b8810a1c", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_12492_CWE_352(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-16925-d4273af28a92fe20", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16925CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16925-d4273af28a92fe20", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16925CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18405-1e78a50a52105321", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18405CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18405-1e78a50a52105321", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18405CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16765-b02a4ceff704e7df", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16765CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16765-b02a4ceff704e7df", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16765CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-14174-d3d77691ab5c253e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14174_CWE_787(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14174-d3d77691ab5c253e", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14174_CWE_787(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12921-9e2dbfc70f4c66f5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_12921_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12921-9e2dbfc70f4c66f5", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-434\nint handle_12921_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-00946-466f42ac876cdcde", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle946CWE863(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-00946-466f42ac876cdcde", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle946CWE863(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-00951-5e73eee844b79892", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_951_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00951-5e73eee844b79892", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-918\nint handle_951_CWE_918(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-10129-7f8b6a0fe36af6a6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10129CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10129-7f8b6a0fe36af6a6", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10129CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-01125-251fae1ee133790a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1125_CWE_122(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01125-251fae1ee133790a", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1125_CWE_122(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-19071-9e8e07ab249dfdde", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19071CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19071-9e8e07ab249dfdde", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19071CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-15523-43eda5c59f1e1934", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_15523_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15523-43eda5c59f1e1934", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_15523_CWE_862(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-09750-05adbed136fea293", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_9750_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09750-05adbed136fea293", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_9750_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-19679-a05f8c14bc769485", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19679CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19679-a05f8c14bc769485", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19679CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15404-62707dc32b754982", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15404CWE787(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15404-62707dc32b754982", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15404CWE787(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15647-b018674f28a6ba55", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15647CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15647-b018674f28a6ba55", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15647CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09345-b8426bcab22b2b69", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9345CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09345-b8426bcab22b2b69", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9345CWE122(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-16649-2ae124ac0d915be5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16649CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16649-2ae124ac0d915be5", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16649CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12739-e57bb9fd0f71adb7", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12739CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12739-e57bb9fd0f71adb7", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12739CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08343-698bf5d3f8552520", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8343CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08343-698bf5d3f8552520", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8343CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-05315-5994e196683526cb", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5315_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05315-5994e196683526cb", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5315_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-15109-9ef0e6b449472a26", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_15109_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15109-9ef0e6b449472a26", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_15109_CWE_94(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-14400-e79e04b3ba195203", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_14400_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14400-e79e04b3ba195203", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-306\nint handle_14400_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-10816-090f3cff06f9660a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10816_CWE_416(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10816-090f3cff06f9660a", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10816_CWE_416(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01085-a93761c9756ca61d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1085_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01085-a93761c9756ca61d", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1085_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "c-02814-1a96a09aab1029e0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_2814_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02814-1a96a09aab1029e0", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_2814_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-04770-8e20d03bdd5e9020", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_4770_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-04770-8e20d03bdd5e9020", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_4770_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-02857-8d136916358fa546", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2857CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02857-8d136916358fa546", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2857CWE125(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-01460-5d2a339df47f9c0c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1460CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01460-5d2a339df47f9c0c", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1460CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-15777-717565b7fb939a6d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_15777_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15777-717565b7fb939a6d", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_15777_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16836-9933237bc9a536fe", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16836CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16836-9933237bc9a536fe", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16836CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return next.startsWith(\"/\") ? next : \"/\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-02974-e5131ff22ef10408", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2974_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02974-e5131ff22ef10408", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2974_CWE_787(int i, int value) {\n int items[8] = {0};\n items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "java-18550-afa93343ac26b32b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18550CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18550-afa93343ac26b32b", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18550CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-14216-a47ffd5ac62bba02", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14216CWE863(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-14216-a47ffd5ac62bba02", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle14216CWE863(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-16571-bd28db97b6cae67c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_16571_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16571-bd28db97b6cae67c", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-89\nint handle_16571_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-12974-f1c90a905bdfb454", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12974_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12974-f1c90a905bdfb454", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12974_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-10404-5c5ccfc0c8643ccd", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10404CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10404-5c5ccfc0c8643ccd", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10404CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new com.fasterxml.jackson.databind.ObjectMapper().readValue(data, Map.class);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11214-6d3e1453d3fd6257", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11214CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11214-6d3e1453d3fd6257", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11214CWE502(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-03578-60743fe247e2d774", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3578CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03578-60743fe247e2d774", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3578CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n Runtime.getRuntime().exec(\"ping -c 1 \" + host);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-18528-9f6dc6d4af3594ee", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18528_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-18528-9f6dc6d4af3594ee", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18528_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15214-f896b9cf2b9d770a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15214CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15214-f896b9cf2b9d770a", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15214CWE770(n) {\n n = Math.min(Number(n), 1000);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-17147-86c87aa62b15ed29", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17147_CWE_125(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-17147-86c87aa62b15ed29", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_17147_CWE_125(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13417-c1295e2b2b41e28c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13417CWE798() {\n return process.env.API_TOKEN;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13417-c1295e2b2b41e28c", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13417CWE798() {\n return process.env.API_TOKEN;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-18416-87d312765a142d8a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_18416_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18416-87d312765a142d8a", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-863\nint handle_18416_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07035-e07f40255203ea9d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7035CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07035-e07f40255203ea9d", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7035CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-14325-610648f5881a4364", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14325CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14325-610648f5881a4364", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14325CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (name.contains(\"..\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-02515-d5186fbf627edbb2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_2515_CWE_190(int count) {\n int bytes = count * 94;\n int bytes = count * 94;\n return bytes;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02515-d5186fbf627edbb2", "template_cwe": "CWE-190"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_2515_CWE_190(int count) {\n int bytes = count * 94;\n int bytes = count * 94;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-190\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-15952-54b7b1098453ea51", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15952CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15952-54b7b1098453ea51", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15952CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-12269-bbc5861418277b80", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12269CWE200(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12269-bbc5861418277b80", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12269CWE200(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-07046-6a97f73678011919", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_7046_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07046-6a97f73678011919", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_7046_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "c-11649-b920f7f21aa44641", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11649_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Free of non-heap memory", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11649-b920f7f21aa44641", "template_cwe": "CWE-590"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11649_CWE_590() {\n char local[8];\n local[0] = 0;\n (void)local;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-01205-832c7762570aa813", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1205_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01205-832c7762570aa813", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1205_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return open(str(Path(base) / name)).read() #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-07068-578737d7b8c6407e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_7068_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-07068-578737d7b8c6407e", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_7068_CWE_284(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-07634-986d0fb601d824a5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7634CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07634-986d0fb601d824a5", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7634CWE502(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-15779-3521b7357ce01cea", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_15779_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15779-3521b7357ce01cea", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_15779_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-05668-142e1ce475d9ccf7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5668_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Double free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-05668-142e1ce475d9ccf7", "template_cwe": "CWE-415"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_5668_CWE_415() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n free(p);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-415\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "python-19156-48304e32603ed13a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19156_CWE_416(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-19156-48304e32603ed13a", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_19156_CWE_416(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-05465-75eb266109e7b943", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5465_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-05465-75eb266109e7b943", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_5465_CWE_22(const char *name) {\n char path[256];\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-22\"],\"is_vulnerable\":true,\"vulnerable_lines\":[8]}<|im_end|>\n"} {"id": "python-09656-138c2428dab5763e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9656_CWE_601(next_url):\n return next_url #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09656-138c2428dab5763e", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9656_CWE_601(next_url):\n return next_url #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-04389-d530c2605a354a69", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4389_CWE_94(expr):\n import ast\n return eval(expr) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04389-d530c2605a354a69", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4389_CWE_94(expr):\n import ast\n return eval(expr) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-08808-c70cb322dea91d5e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8808_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-08808-c70cb322dea91d5e", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_8808_CWE_284(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-14115-497698d8579057d3", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14115_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return p if str(p).startswith(str(Path(base).resolve())) else None\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14115-497698d8579057d3", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14115_CWE_22(base, name):\n from pathlib import Path\n p = (Path(base) / name).resolve()\n return p if str(p).startswith(str(Path(base).resolve())) else None\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-19729-fc5321e147e4b751", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19729CWE94(code) {\n return JSON.parse(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19729-fc5321e147e4b751", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19729CWE94(code) {\n return JSON.parse(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-10794-22bd22a756b256a8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10794_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10794-22bd22a756b256a8", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10794_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-10411-c1f34ffd18215459", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10411_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return None if host not in {'api.example.com'} else requests.get(url, timeout=2)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10411-c1f34ffd18215459", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10411_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return None if host not in {'api.example.com'} else requests.get(url, timeout=2)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-07959-2149f2437d17f462", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7959CWE94(code) {\n return eval(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07959-2149f2437d17f462", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7959CWE94(code) {\n return eval(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-01772-f27d2a0c27051d94", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_1772_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01772-f27d2a0c27051d94", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_1772_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-10320-23a1a72daab322d9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10320CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10320-23a1a72daab322d9", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10320CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19774-44f86e1125996b56", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_19774_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19774-44f86e1125996b56", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_19774_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13347-98158f19b8b583a7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_13347_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13347-98158f19b8b583a7", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-20\nint handle_13347_CWE_20(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18391-b2ee976299716a10", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18391CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18391-b2ee976299716a10", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18391CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16007-37aef173c2906075", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16007CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16007-37aef173c2906075", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16007CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-07409-a3e2036c05928e2d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7409CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-07409-a3e2036c05928e2d", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample7409CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-19254-b93312545488d332", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_19254_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19254-b93312545488d332", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-502\nint handle_19254_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15415-86d62877516489c8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15415CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15415-86d62877516489c8", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15415CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12197-5c79f7f04900f2ea", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_12197_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12197-5c79f7f04900f2ea", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_12197_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12514-b2af1ed6a392c5d4", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12514_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12514-b2af1ed6a392c5d4", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12514_CWE_770(count):\n count = min(int(count), 1000)\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-03949-485b39008f33042f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3949_CWE_200(user):\n return user.__dict__ #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03949-485b39008f33042f", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3949_CWE_200(user):\n return user.__dict__ #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-02111-bb78bf872829d82f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_2111_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02111-bb78bf872829d82f", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_2111_CWE_434(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-03372-10a9ae45a43d50fb", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3372CWE476(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03372-10a9ae45a43d50fb", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3372CWE476(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-01526-2834a991a18de253", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1526_CWE_601(next_url):\n return next_url #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01526-2834a991a18de253", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1526_CWE_601(next_url):\n return next_url #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-15444-446c67999b910b27", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15444_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15444-446c67999b910b27", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15444_CWE_502(blob):\n import json, pickle\n return json.loads(blob)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-04290-41839202baadaafd", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4290CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-04290-41839202baadaafd", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample4290CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-11550-46144223e855b636", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11550CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11550-46144223e855b636", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11550CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-00664-cfb5f6ceb99b2045", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_664_CWE_787(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00664-cfb5f6ceb99b2045", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_664_CWE_787(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-13034-94d9ded113ce3e55", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13034_CWE_787(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-13034-94d9ded113ce3e55", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_13034_CWE_787(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-07302-47b6e92595aced2e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7302_CWE_476(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07302-47b6e92595aced2e", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7302_CWE_476(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-476\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-07764-9a6e7fedf13c8510", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7764CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07764-9a6e7fedf13c8510", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7764CWE770(n) {\n n = Number(n);\n return Buffer.alloc(n * 1024);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-02039-e493323f398f30fc", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2039CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02039-e493323f398f30fc", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2039CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-11328-011c39c03d373446", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11328_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-11328-011c39c03d373446", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_11328_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-01310-b81462bcb50b2b06", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_1310_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01310-b81462bcb50b2b06", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_1310_CWE_306(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-08574-14f25b1630943234", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_8574_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-08574-14f25b1630943234", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_8574_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-18775-15eaa893e80bc7a4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_18775_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18775-15eaa893e80bc7a4", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_18775_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n snprintf(buf, 16, \"%s\", src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-01434-e6980211505d026b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_1434_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01434-e6980211505d026b", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_1434_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "c-00202-eb2f0ab7c2fb6a97", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_202_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-00202-eb2f0ab7c2fb6a97", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_202_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[5]}<|im_end|>\n"} {"id": "c-17013-d28423de001b0599", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_17013_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17013-d28423de001b0599", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-639\nint handle_17013_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05487-2734dad3373df4c8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5487CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Hard-coded credentials", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05487-2734dad3373df4c8", "template_cwe": "CWE-798"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5487CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return \"hardcoded-password\";\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-798\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-16324-71875a012561527a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16324CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16324-71875a012561527a", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16324CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-06394-24a4e38dd18c89d2", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6394_CWE_787(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-06394-24a4e38dd18c89d2", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_6394_CWE_787(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-05411-6c3e3879eea30206", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5411_CWE_434(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05411-6c3e3879eea30206", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5411_CWE_434(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-02898-b894944e739bfade", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2898CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02898-b894944e739bfade", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2898CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-03086-65eff7c0fe45e400", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3086_CWE_601(next_url):\n return next_url #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Open redirect", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03086-65eff7c0fe45e400", "template_cwe": "CWE-601"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3086_CWE_601(next_url):\n return next_url #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-601\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-13320-9681adf9661da763", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_13320_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13320-9681adf9661da763", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_13320_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19067-df1ec73ef66eaf5b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_19067_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19067-df1ec73ef66eaf5b", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_19067_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-19989-86382d575c6cdf6d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19989CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19989-86382d575c6cdf6d", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19989CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-01649-933dadfb6532ebfd", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1649CWE1321(obj, key, value) {\n obj[key] = value;\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-1321\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-01649-933dadfb6532ebfd", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1649CWE1321(obj, key, value) {\n obj[key] = value;\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-1321\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-08798-caea6471ea701865", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_8798_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-08798-caea6471ea701865", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_8798_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\n system(cmd);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[9]}<|im_end|>\n"} {"id": "javascript-12318-cdb0a2e65d6bd9c9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12318CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12318-cdb0a2e65d6bd9c9", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12318CWE78(host) {\n return require('child_process').execFile('ping', ['-c', '1', host]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-17549-ed6e8d9a0fa9d35e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17549CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17549-ed6e8d9a0fa9d35e", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17549CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18443-277fafba6bdb447d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18443CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18443-277fafba6bdb447d", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18443CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-19592-13461925dc81a103", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19592CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-19592-13461925dc81a103", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample19592CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-16779-397e18dda924df5a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16779CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-16779-397e18dda924df5a", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle16779CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-07488-11a956dfc2021a11", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7488CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07488-11a956dfc2021a11", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7488CWE284(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-284\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-12574-a4c8a2d22e530ff7", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12574CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12574-a4c8a2d22e530ff7", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12574CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Math.min(Integer.parseInt(count), 1000);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-07230-e9093cac9e86b7c6", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_7230_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07230-e9093cac9e86b7c6", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-79\nint handle_7230_CWE_79(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-18073-0dab6529672872ad", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18073CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18073-0dab6529672872ad", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18073CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-10797-a392482373b20e00", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10797_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10797-a392482373b20e00", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10797_CWE_20(age):\n age = int(age)\n if age < 0 or age > 130: raise ValueError()\n return age\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-16381-5581bfe79950140f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16381CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-16381-5581bfe79950140f", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample16381CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-08399-e79d22b08c2af3a5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8399CWE1321(obj, key, value) {\n obj[key] = value;\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-1321\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-08399-e79d22b08c2af3a5", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle8399CWE1321(obj, key, value) {\n obj[key] = value;\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-1321\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-07314-35e611844da09c3b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7314_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07314-35e611844da09c3b", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7314_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-05732-f04aa3b7f3020d1d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5732CWE352(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05732-f04aa3b7f3020d1d", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5732CWE352(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-08249-d4cc8eda7cb87188", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8249CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08249-d4cc8eda7cb87188", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8249CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.newDocumentBuilder().parse(in);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-611\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-02911-97fed9910fbf1639", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2911_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-02911-97fed9910fbf1639", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2911_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-14740-2c910bb3cc2abfff", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14740CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-14740-2c910bb3cc2abfff", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample14740CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-10502-269d78896bdc1ac7", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10502CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10502-269d78896bdc1ac7", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10502CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13365-dd84f97605766889", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13365_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13365-dd84f97605766889", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13365_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-16198-c61ee1a4926b5def", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_16198_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16198-c61ee1a4926b5def", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-284\nint handle_16198_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-05533-2aa3a6a7b15c6405", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5533_CWE_121(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-05533-2aa3a6a7b15c6405", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_5533_CWE_121(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-04036-8e947bf29be46240", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4036_CWE_863(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04036-8e947bf29be46240", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4036_CWE_863(request, owner_id):\n data = load_record(owner_id) #\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-863\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-01837-1556ecd181d29867", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_1837_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-01837-1556ecd181d29867", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nint handle_1837_CWE_125(int i) {\n int items[8] = {0};\n return items[i];\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-125\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "python-03285-6e096ebc59b01172", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3285_CWE_122(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03285-6e096ebc59b01172", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3285_CWE_122(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-03873-5dfb09a7397f775c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3873CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03873-5dfb09a7397f775c", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3873CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-01703-923b250d5420cc88", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1703CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01703-923b250d5420cc88", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1703CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-03036-e2f1a63db198ef20", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3036CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03036-e2f1a63db198ef20", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3036CWE416(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-19757-7f7340507662f832", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19757CWE125(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-19757-7f7340507662f832", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle19757CWE125(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-13679-13ad8425d9db0f39", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13679CWE200(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13679-13ad8425d9db0f39", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13679CWE200(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-11608-c544e4bcee753d57", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11608CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11608-c544e4bcee753d57", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11608CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-04983-6219879df76acdd0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_4983_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04983-6219879df76acdd0", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-862\nint handle_4983_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-10700-f37ef784ad88eb35", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10700CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10700-f37ef784ad88eb35", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10700CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-09374-3e3d795100c4be56", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9374CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09374-3e3d795100c4be56", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9374CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return new java.io.ObjectInputStream(in).readObject();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-502\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-09831-a4e498b9d445da99", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9831_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Server-side request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09831-a4e498b9d445da99", "template_cwe": "CWE-918"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9831_CWE_918(url):\n import requests, urllib.parse\n host = urllib.parse.urlparse(url).hostname\n return requests.get(url, timeout=2) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-918\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-18489-120b30b9f3a998b3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18489CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "XML external entity", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18489-120b30b9f3a998b3", "template_cwe": "CWE-611"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18489CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n factory.setFeature(\"http://apache.org/xml/features/disallow-doctype-decl\", true);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-11576-dbe034910785f825", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_11576_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11576-dbe034910785f825", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-863\nint handle_11576_CWE_863(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-06026-58eef2b3f122ce32", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_6026_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Integer underflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-06026-58eef2b3f122ce32", "template_cwe": "CWE-191"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nunsigned handle_6026_CWE_191(unsigned credits, unsigned cost) {\n return credits - cost;\n return credits - cost;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-191\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-03135-4b758a7e14fad07e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3135CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03135-4b758a7e14fad07e", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3135CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-17672-8788315d23a53ffd", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17672_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17672-8788315d23a53ffd", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17672_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-16340-16ccddd54896cedb", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16340_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-16340-16ccddd54896cedb", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_16340_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-02221-9f80b10d732c4bdc", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2221CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02221-9f80b10d732c4bdc", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2221CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n st.executeQuery(\"select * from users where id=\" + id);\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-10911-046bdbb144689bcb", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_10911_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-10911-046bdbb144689bcb", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-434\nint handle_10911_CWE_434(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-08100-66edf8c073412f49", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8100CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08100-66edf8c073412f49", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8100CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-10109-bd24b70b51e08e1d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10109CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10109-bd24b70b51e08e1d", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10109CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-10172-52a6df07c2f0e7fd", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10172_CWE_77(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10172-52a6df07c2f0e7fd", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10172_CWE_77(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-11235-3620e7a0bb872c1d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11235_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11235-3620e7a0bb872c1d", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11235_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19994-d917a0a792b6899f", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19994_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19994-d917a0a792b6899f", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_19994_CWE_787(int i, int value) {\n int items[8] = {0};\n if (i >= 0 && i < 8) items[i] = value;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-01134-26cb48c365c86dba", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1134CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-01134-26cb48c365c86dba", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1134CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "cpp-02703-8b58a8a4af959681", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_2703_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-02703-8b58a8a4af959681", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-862\nint handle_2703_CWE_862(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-13174-232a02789d07fc2e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_13174_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-13174-232a02789d07fc2e", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-770\nint handle_13174_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-17547-45f4c41959f84daa", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17547CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17547-45f4c41959f84daa", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17547CWE20(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-09523-b20644f43df51613", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9523CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09523-b20644f43df51613", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9523CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-09670-a94abd4ccfbecc17", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9670_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09670-a94abd4ccfbecc17", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_9670_CWE_120(const char *src) {\n char buf[16];\n strcpy(buf, src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[6]}<|im_end|>\n"} {"id": "cpp-16457-e61063911ed8e17c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_16457_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16457-e61063911ed8e17c", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nint handle_16457_CWE_125(int i) {\n int items[8] = {0};\n if (i < 0 || i >= 8) return -1;\n return items[i];\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-18148-625bd0feed675f73", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_18148_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18148-625bd0feed675f73", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-284\nint handle_18148_CWE_284(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15728-1fae0ebae0b5f5d6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15728CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper certificate validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15728-1fae0ebae0b5f5d6", "template_cwe": "CWE-295"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15728CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return javax.net.ssl.HttpsURLConnection.getDefaultHostnameVerifier();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-09841-238f9b2c9b698162", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9841_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09841-238f9b2c9b698162", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9841_CWE_89(db, user_id):\n return db.execute('select * from users where id = ' + user_id) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-15045-5423b4daee4ebeca", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15045CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15045-5423b4daee4ebeca", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15045CWE22(name) {\n if (name.includes('..')) throw new Error('bad path');\n return fs.readFileSync('/srv/data/' + name);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-18316-5a56f0381a285202", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18316_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-18316-5a56f0381a285202", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_18316_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-01732-d97c729ba4f46047", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1732_CWE_77(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-01732-d97c729ba4f46047", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1732_CWE_77(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-09513-9c0d32f781805ffb", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9513CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09513-9c0d32f781805ffb", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9513CWE862(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-04172-6d40236e435a3c62", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_4172_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-04172-6d40236e435a3c62", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-352\nint handle_4172_CWE_352(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "cpp-18419-b255e805e39206a3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_18419_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18419-b255e805e39206a3", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-200\nint handle_18419_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-19001-8deee502180146a4", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_19001_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-19001-8deee502180146a4", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_19001_CWE_89(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-09322-dcefca8e1cba867d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9322_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-09322-dcefca8e1cba867d", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_9322_CWE_77(const char *arg) {\n execlp(\"sh\", \"sh\", \"-c\", arg, NULL);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "python-04282-582094edeeefb480", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4282_CWE_77(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-04282-582094edeeefb480", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_4282_CWE_77(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-77\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-12201-e1902e9257a947e2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12201CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-12201-e1902e9257a947e2", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle12201CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15107-b0503b62a23ba889", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15107CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15107-b0503b62a23ba889", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15107CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-09361-ec8ca9e7ec4e8124", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_9361_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-09361-ec8ca9e7ec4e8124", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-89\nint handle_9361_CWE_89(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-89\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-06049-7ff22a3a5012f385", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6049CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06049-7ff22a3a5012f385", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6049CWE200(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "cpp-12062-462a96b71bc214e9", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12062_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12062-462a96b71bc214e9", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12062_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-10851-eba05b12a09aa695", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10851CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-10851-eba05b12a09aa695", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle10851CWE434(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-16022-45c974fb0845ea1c", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16022_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-16022-45c974fb0845ea1c", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_16022_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-09310-f85e76c54192411c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9310_CWE_120(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-09310-f85e76c54192411c", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_9310_CWE_120(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-08260-2bfcfa927f3d047a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8260CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08260-2bfcfa927f3d047a", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8260CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-11965-f7ef1d48fd12c321", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11965CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11965-f7ef1d48fd12c321", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11965CWE122(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19380-0d725fff017c4186", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_19380_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19380-0d725fff017c4186", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-306\nint handle_19380_CWE_306(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12503-216ea6d779301109", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12503_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12503-216ea6d779301109", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12503_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-18108-da346a264f870ab3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18108CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-18108-da346a264f870ab3", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample18108CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n new ProcessBuilder(\"ping\", \"-c\", \"1\", host).start();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-13486-69383bcec06dfe1e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13486_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-13486-69383bcec06dfe1e", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_13486_CWE_416() {\n char *p = (char*)malloc(16);\n if (!p) return;\n free(p);\n p = NULL;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-07787-9d38e3d30126e0b9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7787CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper input validation", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-07787-9d38e3d30126e0b9", "template_cwe": "CWE-20"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle7787CWE20(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-20\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-17606-45cea1a4ecb40cbb", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17606CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Incorrect authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17606-45cea1a4ecb40cbb", "template_cwe": "CWE-863"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17606CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-14958-02948918c95cd899", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14958_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-14958-02948918c95cd899", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_14958_CWE_78(host):\n import subprocess\n return subprocess.run(['ping', '-c', '1', host], check=False)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-12411-effe6ca9d8eae04c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12411CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-12411-effe6ca9d8eae04c", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample12411CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-18285-ab4e466ac87d72fd", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_18285_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-18285-ab4e466ac87d72fd", "template_cwe": "CWE-22"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_18285_CWE_22(const char *name) {\n char path[256];\n if (strstr(name, \"..\")) return;\n snprintf(path, sizeof(path), \"/srv/data/%s\", name);\n puts(path);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-06902-8f383511319740c8", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6902CWE352(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06902-8f383511319740c8", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6902CWE352(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-10162-e76e5bc5d546e6ee", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10162CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Null pointer dereference", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-10162-e76e5bc5d546e6ee", "template_cwe": "CWE-476"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample10162CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-03403-8894442e52bf1fdf", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3403CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03403-8894442e52bf1fdf", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3403CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-121\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-02845-b010fe0f0bc17cec", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2845CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02845-b010fe0f0bc17cec", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2845CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-00229-7a028fae1a93f719", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_229_CWE_200(user):\n return user.__dict__ #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00229-7a028fae1a93f719", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_229_CWE_200(user):\n return user.__dict__ #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "java-00671-184bccab70dcf8d8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample671CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Dangerous file upload", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-00671-184bccab70dcf8d8", "template_cwe": "CWE-434"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample671CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-434\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-03745-bd0f6426faffb9c9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3745CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-03745-bd0f6426faffb9c9", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3745CWE400(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-400\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-07005-b6d2c70db539badf", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7005_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-07005-b6d2c70db539badf", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_7005_CWE_122(const char *src) {\n char *buf = (char*)malloc(16);\n if (!buf) return;\n strcpy(buf, src);\n free(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-122\"],\"is_vulnerable\":true,\"vulnerable_lines\":[7]}<|im_end|>\n"} {"id": "java-13318-671ee87e19889c55", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13318CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-13318-671ee87e19889c55", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample13318CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-15160-ec151e5d6a6f2eca", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_15160_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-15160-ec151e5d6a6f2eca", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-79\nint handle_15160_CWE_79(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-03849-0366853ebcf460ef", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_3849_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-03849-0366853ebcf460ef", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_3849_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-09949-b8fc5e27562b7d06", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9949CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-09949-b8fc5e27562b7d06", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample9949CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-200\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-11585-e8e7fb9d69aaaeec", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11585CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-11585-e8e7fb9d69aaaeec", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample11585CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-02079-b42573f453607920", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_2079_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02079-b42573f453607920", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-94\nint handle_2079_CWE_94(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "python-03880-4bcfc36c4bb7f6f7", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3880_CWE_120(value):\n return str(value) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03880-4bcfc36c4bb7f6f7", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3880_CWE_120(value):\n return str(value) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-120\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-02499-e6cbcffed96f2793", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2499CWE94(code) {\n return eval(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-02499-e6cbcffed96f2793", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2499CWE94(code) {\n return eval(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-13181-ed6b697fb7d864cd", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13181CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "SQL injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13181-ed6b697fb7d864cd", "template_cwe": "CWE-89"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13181CWE89(db, id) {\n return db.query('select * from users where id = ?', [id]);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-03114-1c4ed44caf451df2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3114CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03114-1c4ed44caf451df2", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3114CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n int n = Integer.parseInt(count); byte[] b = new byte[n * 1024 * 1024];\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "javascript-06898-79df7c77fcb2193d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6898CWE915(target, body) {\n return Object.assign(target, body);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution / object injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06898-79df7c77fcb2193d", "template_cwe": "CWE-915"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6898CWE915(target, body) {\n return Object.assign(target, body);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-915\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-07118-fea15d07211eadf5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7118_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-07118-fea15d07211eadf5", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_7118_CWE_78(host):\n import subprocess\n return subprocess.run('ping -c 1 ' + host, shell=True) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-78\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "java-03420-a024ef817e22e90d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3420CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03420-a024ef817e22e90d", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3420CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-08436-3a60016953a311aa", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8436CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Use after free", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-08436-3a60016953a311aa", "template_cwe": "CWE-416"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample8436CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-416\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "python-00654-cd24821f0382f8c0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_654_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-00654-cd24821f0382f8c0", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_654_CWE_770(count):\n count = int(count) #\n return bytearray(count * 1024)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "c-14134-1da9d3f6b4edb72f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_14134_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-14134-1da9d3f6b4edb72f", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_14134_CWE_770(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-17245-06a96ed203e704c5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17245CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17245-06a96ed203e704c5", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17245CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-15783-c47f2a5457314fe3", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15783_CWE_639(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15783-c47f2a5457314fe3", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15783_CWE_639(request, owner_id):\n if not request.user.is_authenticated: raise PermissionError()\n return load_record(owner_id)\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-09920-0d1cbd199a284bd1", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9920CWE306(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authentication", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-09920-0d1cbd199a284bd1", "template_cwe": "CWE-306"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle9920CWE306(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-306\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "javascript-13129-8222710edea71802", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13129CWE94(code) {\n return JSON.parse(code);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-13129-8222710edea71802", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle13129CWE94(code) {\n return JSON.parse(code);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-03992-2a1295bc9059e04d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3992CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site request forgery", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-03992-2a1295bc9059e04d", "template_cwe": "CWE-352"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3992CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-352\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-02453-b9092bbce89c50ac", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2453CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-02453-b9092bbce89c50ac", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2453CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "java-06573-d86e91d3f343be1a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6573CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "Missing authorization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-06573-d86e91d3f343be1a", "template_cwe": "CWE-862"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample6573CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-862\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-17642-ceb2a18280fb9ef0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17642_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-17642-ceb2a18280fb9ef0", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_17642_CWE_77(const char *arg) {\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-15175-9b9808b41eb69a42", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15175_CWE_122(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Heap buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-15175-9b9808b41eb69a42", "template_cwe": "CWE-122"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_15175_CWE_122(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-11213-0c0323d67b77cc51", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11213_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-11213-0c0323d67b77cc51", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_11213_CWE_121(const char *src) {\n char stack_buf[12];\n strncpy(stack_buf, src, sizeof(stack_buf) - 1);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-15092-791d431b8829178f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15092CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-15092-791d431b8829178f", "template_cwe": "CWE-77"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample15092CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-05674-ac4ef8073b80f3d5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5674CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds write", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-05674-ac4ef8073b80f3d5", "template_cwe": "CWE-787"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle5674CWE787(req) {\n return loadSecret(req.query.id);\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-787\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-10439-e161d7d4b8f3d434", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10439_CWE_200(user):\n return {'id': user.id}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-10439-e161d7d4b8f3d434", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_10439_CWE_200(user):\n return {'id': user.id}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-11259-11c58451503fdd26", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11259CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Prototype pollution", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-11259-11c58451503fdd26", "template_cwe": "CWE-1321"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle11259CWE1321(obj, key, value) {\n if (key === '__proto__') throw new Error('bad key');\n return obj;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-15839-2ce64069f7b2ae13", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_15839_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Sensitive information exposure", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-15839-2ce64069f7b2ae13", "template_cwe": "CWE-200"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-200\nint handle_15839_CWE_200(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-02904-8c018217ff96b801", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_2904_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Resource allocation without limits", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-02904-8c018217ff96b801", "template_cwe": "CWE-770"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n// c.c web-style CWE-770\nint handle_2904_CWE_770(const char *user_supplied_value) {\n return user_supplied_value;\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-770\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-18935-77654096357c11e7", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18935CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Uncontrolled resource consumption", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-18935-77654096357c11e7", "template_cwe": "CWE-400"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle18935CWE400(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-14064-10665af58a2b0092", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_14064_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Unsafe deserialization", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-14064-10665af58a2b0092", "template_cwe": "CWE-502"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-502\nint handle_14064_CWE_502(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-19893-985d6290b4792130", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_19893_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-19893-985d6290b4792130", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n// cpp.cpp web-style CWE-639\nint handle_19893_CWE_639(const char *user_supplied_value) {\n validate_request();\n return 0;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-17417-69331bbb9ec72991", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17417CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Out-of-bounds read", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-17417-69331bbb9ec72991", "template_cwe": "CWE-125"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample17417CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n if (!req.isUserInRole(\"admin\")) throw new SecurityException();\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-06330-78012afd40886d38", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6330CWE79(name) {\n return `

${name}

`;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-06330-78012afd40886d38", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle6330CWE79(name) {\n return `

${name}

`;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-79\"],\"is_vulnerable\":true,\"vulnerable_lines\":[2]}<|im_end|>\n"} {"id": "python-03939-1f864140e2c3b29c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3939_CWE_94(expr):\n import ast\n return eval(expr) #\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}", "role": "assistant"}], "metadata": {"cwe_name": "Code injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-03939-1f864140e2c3b29c", "template_cwe": "CWE-94"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3939_CWE_94(expr):\n import ast\n return eval(expr) #\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-94\"],\"is_vulnerable\":true,\"vulnerable_lines\":[3]}<|im_end|>\n"} {"id": "javascript-17218-b8eb2fbe2838e5de", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17218CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Improper access control", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-17218-b8eb2fbe2838e5de", "template_cwe": "CWE-284"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle17218CWE284(req) {\n if (!req.user) throw new Error('auth required');\n return loadSecret(req.user.id);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "python-12743-e17d3a0b8c3425f4", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12743_CWE_121(value):\n return str(value)[:128]\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Stack buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "python-12743-e17d3a0b8c3425f4", "template_cwe": "CWE-121"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_12743_CWE_121(value):\n return str(value)[:128]\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "javascript-15520-b650c0cce5cfba20", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15520CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Cross-site scripting", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "javascript-15520-b650c0cce5cfba20", "template_cwe": "CWE-79"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle15520CWE79(name) {\n return `

${escapeHtml(name)}

`;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "cpp-12528-d56ff4f3f5ac29a5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12528_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "OS command injection", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-12528-d56ff4f3f5ac29a5", "template_cwe": "CWE-78"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_12528_CWE_78(const char *arg) {\n char cmd[128];\n snprintf(cmd, sizeof(cmd), \"ls -- %s\", arg);\nprintf(\"%s\", arg);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-05153-8bbf95c0c812f2cd", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5153CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```", "role": "user"}, {"content": "{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}", "role": "assistant"}], "metadata": {"cwe_name": "User-controlled key authorization bypass", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "java-05153-8bbf95c0c812f2cd", "template_cwe": "CWE-639"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample5153CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.InputStream in, String data, String next, String count) throws Exception {\n return loadSecret(req.getParameter(\"id\"));\n return null;\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[\"CWE-639\"],\"is_vulnerable\":true,\"vulnerable_lines\":[4]}<|im_end|>\n"} {"id": "c-12530-bcea7e2cf285a347", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12530_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```", "role": "user"}, {"content": "{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}", "role": "assistant"}], "metadata": {"cwe_name": "Classic buffer overflow", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "c-12530-bcea7e2cf285a347", "template_cwe": "CWE-120"}, "text": "<|im_start|>system\nYou are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.<|im_end|>\n<|im_start|>user\nAnalyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_12530_CWE_120(const char *src) {\n char buf[16];\n snprintf(buf, sizeof(buf), \"%s\", src);\n puts(buf);\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"}