{"id": "c-03973-d03ef7e639cfae01", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3973_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-03973-d03ef7e639cfae01", "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_3973_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-02182-6c9a858303cda5cf", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2182CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02182-6c9a858303cda5cf", "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 Sample2182CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02713-c01a1ccc81b1adc9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2713CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02713-c01a1ccc81b1adc9", "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 Sample2713CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-00489-fb6a2e193394fda0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_489_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-00489-fb6a2e193394fda0", "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_489_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-01318-2a5f8f74539aedb4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1318CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-01318-2a5f8f74539aedb4", "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 Sample1318CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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": "java-00965-006174bbe9c99396", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample965CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest 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-00965-006174bbe9c99396", "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 Sample965CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest 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": "java-02147-7d838812901e7a62", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2147CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-02147-7d838812901e7a62", "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 Sample2147CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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": "c-03669-062f8e3363f29dc6", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3669_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-03669-062f8e3363f29dc6", "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_3669_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-00081-3b8a219610cecb51", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle81CWE918(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-00081-3b8a219610cecb51", "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 handle81CWE918(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": "cpp-00600-86cbd1dd2cd66cb4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_600_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-00600-86cbd1dd2cd66cb4", "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_600_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-00037-b0d604b23db03c9a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample37CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00037-b0d604b23db03c9a", "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 Sample37CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00647-282b5548a89fa3fd", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_647_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-00647-282b5548a89fa3fd", "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_647_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-00735-6e1e9a1426230c1a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_735_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-00735-6e1e9a1426230c1a", "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_735_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-03379-f578e44127158b89", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_3379_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-03379-f578e44127158b89", "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_3379_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-02759-9b00f9dcc3ad78c0", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2759CWE94(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-02759-9b00f9dcc3ad78c0", "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 handle2759CWE94(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-02486-78912d84af65d174", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2486_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-02486-78912d84af65d174", "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_2486_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-00581-1b7120be8ce39401", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_581_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-00581-1b7120be8ce39401", "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_581_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-01222-ea84d45f459df216", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1222_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-01222-ea84d45f459df216", "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_1222_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": "python-02154-274b2c16aae7c82e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2154_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-02154-274b2c16aae7c82e", "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_2154_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-01734-6291a42a4565092e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1734CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-01734-6291a42a4565092e", "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 Sample1734CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-01286-99929c971ce998ca", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1286_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-01286-99929c971ce998ca", "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_1286_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-01288-53b0414bfe7841b0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1288_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-01288-53b0414bfe7841b0", "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_1288_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": "java-02964-7a5eb6861cf82e1b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2964CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02964-7a5eb6861cf82e1b", "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 Sample2964CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03968-71efc9b08a651aad", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3968CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03968-71efc9b08a651aad", "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 Sample3968CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-01434-22f0dd44b8617ace", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1434CWE770(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-01434-22f0dd44b8617ace", "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 handle1434CWE770(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-02140-10957246ff3fc3e3", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2140CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02140-10957246ff3fc3e3", "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 Sample2140CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03172-987ca0d3950e5ee9", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3172CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03172-987ca0d3950e5ee9", "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 Sample3172CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02345-47b8e295f3e34ec5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2345CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02345-47b8e295f3e34ec5", "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 Sample2345CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-01096-dd478fa22a69f504", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1096CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01096-dd478fa22a69f504", "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 Sample1096CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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": "python-02372-7d412193b29e87e7", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2372_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-02372-7d412193b29e87e7", "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_2372_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": "c-02842-6c0c99b009b02a83", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_2842_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-02842-6c0c99b009b02a83", "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_2842_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": "java-03518-595684d732404844", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3518CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03518-595684d732404844", "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 Sample3518CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02673-c5db645e6d7d23fa", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2673CWE121(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-02673-c5db645e6d7d23fa", "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 handle2673CWE121(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": "cpp-03387-1e43ff58a267f4ba", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_3387_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-03387-1e43ff58a267f4ba", "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_3387_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-00722-d3415dd479732d0c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_722_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-00722-d3415dd479732d0c", "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_722_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-00562-a83ed0cf3b374606", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_562_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-00562-a83ed0cf3b374606", "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_562_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-01219-8aa3155ac988d649", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1219CWE200(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-01219-8aa3155ac988d649", "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 handle1219CWE200(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-02365-8329e4383cbd1fe0", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2365_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-02365-8329e4383cbd1fe0", "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_2365_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-03395-136fff8bd61df4cd", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3395CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03395-136fff8bd61df4cd", "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 Sample3395CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-01755-92e1123858da3745", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1755_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-01755-92e1123858da3745", "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_1755_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-01834-dff1134e96314411", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1834CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01834-dff1134e96314411", "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 Sample1834CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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": "cpp-01128-d97915642bcee2ab", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_1128_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-01128-d97915642bcee2ab", "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_1128_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-00378-1bf578701e26a88b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_378_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-00378-1bf578701e26a88b", "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_378_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-03904-099bcc66a317f94e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3904_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-03904-099bcc66a317f94e", "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_3904_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-02238-201bd6deb0c61507", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2238CWE915(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-02238-201bd6deb0c61507", "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 handle2238CWE915(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-00048-225646cb13602294", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle48CWE284(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-00048-225646cb13602294", "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 handle48CWE284(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-00176-17ac836d9473445b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_176_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-00176-17ac836d9473445b", "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_176_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-02107-956acac06bd92ec4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2107CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02107-956acac06bd92ec4", "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 Sample2107CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03459-46e67a2db65b074b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3459CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03459-46e67a2db65b074b", "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 Sample3459CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-01635-61d676d456abed5f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1635CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01635-61d676d456abed5f", "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 Sample1635CWE122 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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": "javascript-02211-a9538bf54170c93c", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2211CWE89(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-02211-a9538bf54170c93c", "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 handle2211CWE89(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-00949-69d419f8148c83de", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle949CWE200(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-00949-69d419f8148c83de", "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 handle949CWE200(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-03211-d8a9ffcb45cf1451", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3211_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-03211-d8a9ffcb45cf1451", "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_3211_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-03349-ef59079fe516fd5e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3349CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest 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-03349-ef59079fe516fd5e", "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 Sample3349CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest 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": "cpp-00166-4cb639b714000c44", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_166_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-00166-4cb639b714000c44", "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_166_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-01343-db80e563f815e85f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1343CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01343-db80e563f815e85f", "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 Sample1343CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-02244-11a28f834f7238c4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2244CWE787(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-02244-11a28f834f7238c4", "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 handle2244CWE787(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-01827-0007c4618003eee1", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1827CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-01827-0007c4618003eee1", "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 Sample1827CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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": "c-02311-1f99c07d82abf52b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_2311_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-02311-1f99c07d82abf52b", "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_2311_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-01205-9e28a6853ab9654a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1205CWE22(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-01205-9e28a6853ab9654a", "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 handle1205CWE22(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-00247-5dc8ca1ceddab088", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_247_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-00247-5dc8ca1ceddab088", "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_247_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": "c-03306-1fde8c1f89e6d825", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3306_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-03306-1fde8c1f89e6d825", "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_3306_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-00153-f7ecc09d299cd6e6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample153CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00153-f7ecc09d299cd6e6", "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 Sample153CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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": "python-02599-35de2cae472a61f7", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2599_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-02599-35de2cae472a61f7", "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_2599_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-01912-7d15c8c543457b9e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1912CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01912-7d15c8c543457b9e", "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 Sample1912CWE77 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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": "python-00974-56bb039a6a33e8e8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_974_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-00974-56bb039a6a33e8e8", "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_974_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-00392-a41883eb7d72de1b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_392_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-00392-a41883eb7d72de1b", "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_392_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": "javascript-03828-1d4039da8029655e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3828CWE915(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-03828-1d4039da8029655e", "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 handle3828CWE915(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-00317-52d9ea00df3a650c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample317CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00317-52d9ea00df3a650c", "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 Sample317CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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": "cpp-00834-5c9544732f4c8049", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_834_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-00834-5c9544732f4c8049", "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_834_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-02570-9d39f23008ac988f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2570CWE79(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-02570-9d39f23008ac988f", "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 handle2570CWE79(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-02946-59d5bcb247c3022f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2946CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02946-59d5bcb247c3022f", "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 Sample2946CWE863 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-01837-abae7308710d084c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1837_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-01837-abae7308710d084c", "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_1837_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-03794-3b37781c5631f291", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3794CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-03794-3b37781c5631f291", "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 Sample3794CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-03566-3aca1675d2fc05ac", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3566_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-03566-3aca1675d2fc05ac", "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_3566_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-01583-fc93ed6126423bc2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1583CWE639(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-01583-fc93ed6126423bc2", "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 handle1583CWE639(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-03998-d2e9be7b324a2703", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3998CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03998-d2e9be7b324a2703", "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 Sample3998CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02550-3e5ae178004b4653", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2550_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-02550-3e5ae178004b4653", "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_2550_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-03212-1303aba053d9c5ff", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_3212_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-03212-1303aba053d9c5ff", "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_3212_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-03793-5f9805b2f349537f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3793_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-03793-5f9805b2f349537f", "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_3793_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": "cpp-02958-421b8be2d484f1b1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2958_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-02958-421b8be2d484f1b1", "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_2958_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-00048-2cba363cfc576b29", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample48CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00048-2cba363cfc576b29", "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 Sample48CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-02363-e7f494047a2fe594", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2363CWE862(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-02363-e7f494047a2fe594", "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 handle2363CWE862(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-02665-7a5822dd7b4c3031", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2665_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-02665-7a5822dd7b4c3031", "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_2665_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-01085-94ec3bda19d85de8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\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\":[8]}", "role": "assistant"}], "metadata": {"cwe_name": "Path traversal", "format": "qwen-chatml-unsloth-sft", "line_indexing": "1-based", "source": "synthetic-template", "source_id": "cpp-01085-94ec3bda19d85de8", "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_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\":[8]}<|im_end|>\n"} {"id": "cpp-01856-5f22f415d6085be3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_1856_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-01856-5f22f415d6085be3", "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_1856_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-00875-a6f6619facb6beed", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_875_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-00875-a6f6619facb6beed", "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_875_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-02239-2058d285bf249c2c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2239_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-02239-2058d285bf249c2c", "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_2239_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-03720-8a0561f4e0f2a305", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3720CWE120(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-03720-8a0561f4e0f2a305", "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 handle3720CWE120(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-01535-32523b0c2381c6c5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1535_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-01535-32523b0c2381c6c5", "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_1535_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": "javascript-00715-66cf141f6079381d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle715CWE400(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-00715-66cf141f6079381d", "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 handle715CWE400(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-01090-1672486383f7af54", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1090_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-01090-1672486383f7af54", "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_1090_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": "c-02832-f23859332e300f10", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2832_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-02832-f23859332e300f10", "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_2832_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-00865-b59c3073e30dc73a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_865_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-00865-b59c3073e30dc73a", "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_865_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-03807-c81c3a06b4e39568", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3807_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-03807-c81c3a06b4e39568", "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_3807_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-01020-d65d2ff645a08dea", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1020CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01020-d65d2ff645a08dea", "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 Sample1020CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01597-36cb7ab56b1691cb", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1597_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-01597-36cb7ab56b1691cb", "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_1597_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-01388-e6390324bfa7a8b8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1388_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-01388-e6390324bfa7a8b8", "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_1388_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-01784-752bc24e45525cdb", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1784CWE502(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-01784-752bc24e45525cdb", "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 handle1784CWE502(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-03802-a4aff8f84ac46566", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3802_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-03802-a4aff8f84ac46566", "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_3802_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-03195-7b134d3cce86beaf", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3195_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 18;\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-03195-7b134d3cce86beaf", "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_3195_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 18;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "c-03346-b0537896d2c0136a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3346_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-03346-b0537896d2c0136a", "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_3346_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": "c-02000-2a575bc5a22869bb", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_2000_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-02000-2a575bc5a22869bb", "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_2000_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-00340-b34c7b52276000ca", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_340_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-00340-b34c7b52276000ca", "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_340_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-00667-0ea949e8ac9ce68e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_667_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-00667-0ea949e8ac9ce68e", "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_667_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-01969-033ae07a42bcc8c3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_1969_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-01969-033ae07a42bcc8c3", "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_1969_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-01866-2848c5228df7a09e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1866CWE416(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-01866-2848c5228df7a09e", "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 handle1866CWE416(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-02566-62dd5358cee47c1f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2566_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-02566-62dd5358cee47c1f", "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_2566_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-01877-a2b04f806c065c24", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_1877_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-01877-a2b04f806c065c24", "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_1877_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-03766-3054454e3a2b0149", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3766_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-03766-3054454e3a2b0149", "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_3766_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-02410-4e7784d9af963db2", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_2410_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-02410-4e7784d9af963db2", "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_2410_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-02854-af0722c51b68c8f3", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_2854_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-02854-af0722c51b68c8f3", "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_2854_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-01371-d4a963b36357c09b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1371CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01371-d4a963b36357c09b", "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 Sample1371CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-03210-a5369a2543cc0a88", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3210CWE120(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-03210-a5369a2543cc0a88", "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 handle3210CWE120(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-03419-ce371f7c455866b3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_3419_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-03419-ce371f7c455866b3", "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_3419_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-00334-e694512cf8ab49f7", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_334_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-00334-e694512cf8ab49f7", "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_334_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": "c-03084-0e928737ddf3fdc0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3084_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-03084-0e928737ddf3fdc0", "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_3084_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-03845-c3b0ed033d4637ad", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3845_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-03845-c3b0ed033d4637ad", "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_3845_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": "javascript-00313-a293f2283eb9b5b2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle313CWE121(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-00313-a293f2283eb9b5b2", "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 handle313CWE121(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": "javascript-01756-0e5fa4f9bb62655f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1756CWE863(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-01756-0e5fa4f9bb62655f", "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 handle1756CWE863(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": "javascript-02196-cb81f57ab26dcf9e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2196CWE863(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-02196-cb81f57ab26dcf9e", "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 handle2196CWE863(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-03320-fb29afbea639349d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3320CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03320-fb29afbea639349d", "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 Sample3320CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02864-2aae8e13b19c02f2", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_2864_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-02864-2aae8e13b19c02f2", "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_2864_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-01163-34495a903af8b28f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1163CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01163-34495a903af8b28f", "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 Sample1163CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-03456-3f8c355d757168be", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3456_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-03456-3f8c355d757168be", "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_3456_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-01037-9c1fdc9a7b7b9a86", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_1037_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-01037-9c1fdc9a7b7b9a86", "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_1037_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-00398-a6d8bb840c01f9d4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample398CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest 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-00398-a6d8bb840c01f9d4", "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 Sample398CWE78 {\n Object handle(javax.servlet.http.HttpServletRequest 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-00263-471857adc3f30727", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample263CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00263-471857adc3f30727", "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 Sample263CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-03790-fa6b0c3306820b8b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3790CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03790-fa6b0c3306820b8b", "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 Sample3790CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-01275-662958548e6217f2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1275_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-01275-662958548e6217f2", "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_1275_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-02580-e79ef23ea7cdd6ae", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2580CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02580-e79ef23ea7cdd6ae", "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 Sample2580CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-00811-dd290a6aa94875f5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle811CWE89(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-00811-dd290a6aa94875f5", "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 handle811CWE89(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-01196-fe3887ef9b2a8570", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1196CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-01196-fe3887ef9b2a8570", "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 Sample1196CWE601 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-02552-040d12556e5f34e0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2552_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-02552-040d12556e5f34e0", "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_2552_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": "java-02437-ce7a6f3fd94f49d6", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2437CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02437-ce7a6f3fd94f49d6", "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 Sample2437CWE20 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-01722-2a230d687b93c50b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1722_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-01722-2a230d687b93c50b", "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_1722_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-01833-28b9b4c602e07c5c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1833_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-01833-28b9b4c602e07c5c", "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_1833_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-03149-b8c9bf2f8e32ad86", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3149_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-03149-b8c9bf2f8e32ad86", "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_3149_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-03139-eadf719c6cb30b7f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3139_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-03139-eadf719c6cb30b7f", "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_3139_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": "java-02850-c881ebf743624472", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2850CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02850-c881ebf743624472", "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 Sample2850CWE120 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03602-cc9b5f49eb372aec", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3602CWE476(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-03602-cc9b5f49eb372aec", "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 handle3602CWE476(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-03691-7777dd34e3a87044", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3691CWE434(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-03691-7777dd34e3a87044", "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 handle3691CWE434(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-02907-fa9607b58a6f1a2d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2907_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-02907-fa9607b58a6f1a2d", "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_2907_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": "python-00476-527a66961661fa55", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_476_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-00476-527a66961661fa55", "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_476_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-02394-28dd48948cbb783b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2394_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-02394-28dd48948cbb783b", "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_2394_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-00428-601681d93b12ae3b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_428_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-00428-601681d93b12ae3b", "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_428_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-03810-7a4e08ac86aa301c", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3810_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-03810-7a4e08ac86aa301c", "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_3810_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": "javascript-02940-66b1a2c9cb865df2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2940CWE120(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-02940-66b1a2c9cb865df2", "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 handle2940CWE120(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-01965-e7f1dc2e773969b4", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1965_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-01965-e7f1dc2e773969b4", "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_1965_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-03403-72e2789e2d93b83e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3403CWE639(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-03403-72e2789e2d93b83e", "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 handle3403CWE639(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-01072-d56182a5f61a8182", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1072_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-01072-d56182a5f61a8182", "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_1072_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": "python-01504-8523e0702436bb6f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1504_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-01504-8523e0702436bb6f", "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_1504_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": "c-00443-190339bfe5467431", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_443_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-00443-190339bfe5467431", "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_443_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-00011-ca16ac72a9e2d216", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_11_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-00011-ca16ac72a9e2d216", "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_11_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-03258-eba48d9a1375a74c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3258CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-03258-eba48d9a1375a74c", "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 Sample3258CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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": "javascript-00024-fdaa7a8b99245fb0", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle24CWE770(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-00024-fdaa7a8b99245fb0", "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 handle24CWE770(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-03966-0bfdc35ffbaca47f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3966_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-03966-0bfdc35ffbaca47f", "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_3966_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-00659-8e5619ef92a51e27", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_659_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-00659-8e5619ef92a51e27", "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_659_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-01381-5bdce91856e4b764", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_1381_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-01381-5bdce91856e4b764", "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_1381_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-01300-3d5668e6f3b300e1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1300_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-01300-3d5668e6f3b300e1", "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_1300_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-03605-3e54d5873614cedf", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3605_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-03605-3e54d5873614cedf", "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_3605_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-00916-c616bf46104aeda7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_916_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-00916-c616bf46104aeda7", "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_916_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-00185-ba94537230b06cb9", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_185_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-00185-ba94537230b06cb9", "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_185_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": "cpp-01013-381970dc96ce3942", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_1013_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-01013-381970dc96ce3942", "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_1013_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-01692-b139230900bb6642", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1692CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01692-b139230900bb6642", "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 Sample1692CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01861-e4058fa8a600f5cb", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_1861_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-01861-e4058fa8a600f5cb", "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_1861_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": "python-03703-8f76d176a99613a1", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3703_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-03703-8f76d176a99613a1", "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_3703_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": "c-00636-bacb2e18e96deeb7", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_636_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-00636-bacb2e18e96deeb7", "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_636_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": "cpp-00464-71a472d3bdf38b92", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_464_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-00464-71a472d3bdf38b92", "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_464_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-00223-6e3dc95816d3a2b8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_223_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-00223-6e3dc95816d3a2b8", "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_223_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-03793-6fd6aae670ff7ea1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_3793_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-03793-6fd6aae670ff7ea1", "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_3793_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-00787-39f8e55c7eede87e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample787CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00787-39f8e55c7eede87e", "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 Sample787CWE125 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01513-68d324c099e05416", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1513_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-01513-68d324c099e05416", "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_1513_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": "python-03106-d1c1e3ca76b08390", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3106_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-03106-d1c1e3ca76b08390", "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_3106_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-02447-caebc620a06023a2", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2447CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-02447-caebc620a06023a2", "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 Sample2447CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-01880-6b4d1a7ab8a7e4b2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_1880_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-01880-6b4d1a7ab8a7e4b2", "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_1880_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-02972-2c7b728dfc4aea09", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_2972_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-02972-2c7b728dfc4aea09", "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_2972_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-00761-c5c7e2cf09cc951d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_761_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-00761-c5c7e2cf09cc951d", "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_761_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-02232-6cc21e642f3953f9", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2232_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-02232-6cc21e642f3953f9", "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_2232_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-02821-21f1ef473ed3cbd3", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2821_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-02821-21f1ef473ed3cbd3", "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_2821_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-02754-6da5aa097751cd4d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2754_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-02754-6da5aa097751cd4d", "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_2754_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-00923-c48641fb4471738d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_923_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-00923-c48641fb4471738d", "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_923_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-02837-ab1344df762539fd", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2837_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-02837-ab1344df762539fd", "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_2837_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-00221-4b779783ada9307e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_221_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-00221-4b779783ada9307e", "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_221_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-01374-e987c8aefc66454b", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1374CWE770(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-01374-e987c8aefc66454b", "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 handle1374CWE770(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": "python-00028-4bed6bfed61d5273", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_28_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-00028-4bed6bfed61d5273", "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_28_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-01679-6fe85492944f8977", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1679_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-01679-6fe85492944f8977", "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_1679_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-01699-d38fa9a4db2a093a", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1699_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-01699-d38fa9a4db2a093a", "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_1699_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-01500-1a258289f32b9f32", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1500CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01500-1a258289f32b9f32", "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 Sample1500CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00230-aa7f1411ca768325", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle230CWE306(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-00230-aa7f1411ca768325", "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 handle230CWE306(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": "c-01389-58950f1a942e14ab", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_1389_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-01389-58950f1a942e14ab", "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_1389_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-03684-ace5688446d63daf", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3684CWE787(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-03684-ace5688446d63daf", "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 handle3684CWE787(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-03787-3f487b813e942576", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3787_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-03787-3f487b813e942576", "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_3787_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-00384-af38c0628a999df0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_384_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-00384-af38c0628a999df0", "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_384_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-03183-ebdbe14bc62e66e8", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3183_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-03183-ebdbe14bc62e66e8", "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_3183_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-02138-097a276125c25b90", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_2138_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-02138-097a276125c25b90", "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_2138_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-02737-afcb9f081e20d9a6", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_2737_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-02737-afcb9f081e20d9a6", "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_2737_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-02583-625451b4dfdf3c4e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2583_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-02583-625451b4dfdf3c4e", "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_2583_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-01776-a6b85512d8d244d0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1776CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01776-a6b85512d8d244d0", "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 Sample1776CWE416 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-02410-ecd08174918376af", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2410CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02410-ecd08174918376af", "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 Sample2410CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02149-306d161a71b25ee2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_2149_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-02149-306d161a71b25ee2", "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_2149_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": "java-02514-6b5b33935b3fbb51", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2514CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02514-6b5b33935b3fbb51", "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 Sample2514CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-00286-22b7eff2680f0679", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle286CWE863(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-00286-22b7eff2680f0679", "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 handle286CWE863(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-00440-388935c4e72b1d7c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_440_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-00440-388935c4e72b1d7c", "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_440_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": "javascript-02849-1249407b945446bb", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2849CWE94(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-02849-1249407b945446bb", "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 handle2849CWE94(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-02176-d1af06647e6f8836", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_2176_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-02176-d1af06647e6f8836", "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_2176_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-03350-9372a5f4820fafe2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_3350_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-03350-9372a5f4820fafe2", "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_3350_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-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": "python-00491-8524d7b5219027c3", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_491_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-00491-8524d7b5219027c3", "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_491_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-00362-81e6db438055f3ea", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_362_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-00362-81e6db438055f3ea", "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_362_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": "cpp-02961-91f6a388186d6e90", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_2961_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-02961-91f6a388186d6e90", "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_2961_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-02321-7f8f219777af6ffe", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_2321_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-02321-7f8f219777af6ffe", "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_2321_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-03125-7f25caeef224a9fd", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3125_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-03125-7f25caeef224a9fd", "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_3125_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-03008-f4aba4df3090cc2d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3008CWE284(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-03008-f4aba4df3090cc2d", "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 handle3008CWE284(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-03019-389a3f0aae5ead2a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3019CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest 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-03019-389a3f0aae5ead2a", "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 Sample3019CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest 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": "cpp-03184-a8d5fac7f474237e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_3184_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-03184-a8d5fac7f474237e", "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_3184_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-01567-26091b9e78d8bbfa", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1567CWE125(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-01567-26091b9e78d8bbfa", "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 handle1567CWE125(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-03769-96563b797c124651", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3769CWE1321(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-03769-96563b797c124651", "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 handle3769CWE1321(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-03254-2963507f025bfe54", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3254CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-03254-2963507f025bfe54", "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 Sample3254CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-00907-ae065c59905d482b", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_907_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-00907-ae065c59905d482b", "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_907_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-02614-e32b0dcf867b4ec8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2614CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-02614-e32b0dcf867b4ec8", "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 Sample2614CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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": "c-02773-71396465be9f91f8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_2773_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-02773-71396465be9f91f8", "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_2773_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-02196-cd61578036aee7bd", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2196_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-02196-cd61578036aee7bd", "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_2196_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-03093-1a7383852c9a857d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3093_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-03093-1a7383852c9a857d", "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_3093_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-03038-2e5bfefe79d578a0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3038_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-03038-2e5bfefe79d578a0", "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_3038_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-01804-1a544d629530fb96", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1804CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01804-1a544d629530fb96", "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 Sample1804CWE787 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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": "python-01301-beff11f194201ad0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1301_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-01301-beff11f194201ad0", "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_1301_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-01692-f9d42f5407930bda", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1692_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-01692-f9d42f5407930bda", "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_1692_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-03261-842aff2f45517d9a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3261CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest 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-03261-842aff2f45517d9a", "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 Sample3261CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest 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": "javascript-00481-1ba3fea004eb6463", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle481CWE89(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-00481-1ba3fea004eb6463", "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 handle481CWE89(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": "c-02802-2585a41f0c520871", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2802_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-02802-2585a41f0c520871", "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_2802_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-03736-6d6e18740a2a30d1", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_3736_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-03736-6d6e18740a2a30d1", "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_3736_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-01917-5014093c51635ab2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1917_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-01917-5014093c51635ab2", "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_1917_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": "javascript-03698-bf4fdbaf9b5e9680", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3698CWE284(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-03698-bf4fdbaf9b5e9680", "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 handle3698CWE284(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-00614-3a8ef6a13f0a7572", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle614CWE502(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-00614-3a8ef6a13f0a7572", "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 handle614CWE502(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-02533-ecc06b777b691e09", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2533CWE639(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-02533-ecc06b777b691e09", "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 handle2533CWE639(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-01449-8704c653e357e1c4", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1449CWE94(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-01449-8704c653e357e1c4", "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 handle1449CWE94(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-00103-4eb647797db78d25", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle103CWE121(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-00103-4eb647797db78d25", "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 handle103CWE121(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-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": "java-00391-59d11e1ad949fec7", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample391CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest 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-00391-59d11e1ad949fec7", "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 Sample391CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest 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-01686-95bd5cc4e0941bbd", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1686CWE416(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-01686-95bd5cc4e0941bbd", "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 handle1686CWE416(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-02171-7f08f75d9f4be661", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_2171_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-02171-7f08f75d9f4be661", "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_2171_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-00551-9c6ed36271f6735f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle551CWE434(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-00551-9c6ed36271f6735f", "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 handle551CWE434(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": "c-01315-ca876ff6ea70c52d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_1315_CWE_190(int count) {\n int bytes = count * 36;\n int bytes = count * 36;\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-01315-ca876ff6ea70c52d", "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_1315_CWE_190(int count) {\n int bytes = count * 36;\n int bytes = count * 36;\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-00130-46cea686585ceac1", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_130_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-00130-46cea686585ceac1", "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_130_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": "python-00953-111e3562a62654b0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_953_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-00953-111e3562a62654b0", "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_953_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-00463-6397387c8b0488a9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle463CWE121(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-00463-6397387c8b0488a9", "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 handle463CWE121(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-02817-28498bf21d27b44b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2817_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-02817-28498bf21d27b44b", "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_2817_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": "c-01570-3ccdc73de8faec56", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1570_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-01570-3ccdc73de8faec56", "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_1570_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-01101-f3ee7d75cc412035", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_1101_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-01101-f3ee7d75cc412035", "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_1101_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-02363-cf8b0a9915781020", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2363CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02363-cf8b0a9915781020", "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 Sample2363CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-01852-73099a56eece2558", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1852_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-01852-73099a56eece2558", "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_1852_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-00184-a19ea6d1eef65394", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle184CWE787(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-00184-a19ea6d1eef65394", "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 handle184CWE787(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-03128-eac1200362c8b784", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3128CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03128-eac1200362c8b784", "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 Sample3128CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02539-4daf3f55d623cc67", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2539_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-02539-4daf3f55d623cc67", "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_2539_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-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": "cpp-01597-b8f7b6f9781c137a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_1597_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-01597-b8f7b6f9781c137a", "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_1597_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-03625-696257220067a26a", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3625CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-03625-696257220067a26a", "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 Sample3625CWE22 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-00237-371ad29b48a36748", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample237CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-00237-371ad29b48a36748", "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 Sample237CWE798 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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": "c-02238-c590b145be8cf17f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2238_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-02238-c590b145be8cf17f", "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_2238_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-00344-a95ab28a86d7b03a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_344_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-00344-a95ab28a86d7b03a", "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_344_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-02251-5b84d81255b5b08b", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2251CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02251-5b84d81255b5b08b", "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 Sample2251CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-01860-9b138b9ffcfd39a2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1860CWE79(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-01860-9b138b9ffcfd39a2", "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 handle1860CWE79(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": "cpp-02574-48d261bf1e3a9e26", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2574_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-02574-48d261bf1e3a9e26", "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_2574_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-00133-9abe72f265c14ba6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle133CWE121(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-00133-9abe72f265c14ba6", "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 handle133CWE121(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": "javascript-02112-1e8352a0404f11c5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2112CWE77(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-02112-1e8352a0404f11c5", "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 handle2112CWE77(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-03643-581fdf28aae84d44", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_3643_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-03643-581fdf28aae84d44", "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_3643_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-02153-3142a3faaa030cd1", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_2153_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-02153-3142a3faaa030cd1", "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_2153_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-03014-4a7d1c2bc0f7248d", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3014CWE770(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-03014-4a7d1c2bc0f7248d", "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 handle3014CWE770(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-03851-901d8e799d870a9f", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3851CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03851-901d8e799d870a9f", "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 Sample3851CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-01289-cd890b1c5f48bac2", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_1289_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-01289-cd890b1c5f48bac2", "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_1289_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-00697-0948721998cc637e", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_697_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-00697-0948721998cc637e", "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_697_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-00744-7a8c9c6f6f54cd54", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample744CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-00744-7a8c9c6f6f54cd54", "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 Sample744CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-03964-adde46c36404f300", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3964CWE502(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-03964-adde46c36404f300", "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 handle3964CWE502(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-02459-a0ed147db915fa98", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2459CWE94(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-02459-a0ed147db915fa98", "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 handle2459CWE94(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-00175-648603daa90c5ab7", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_175_CWE_190(int count) {\n int bytes = count * 9;\n int bytes = count * 9;\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-00175-648603daa90c5ab7", "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_175_CWE_190(int count) {\n int bytes = count * 9;\n int bytes = count * 9;\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-02519-8faca6c17715d918", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2519CWE94(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-02519-8faca6c17715d918", "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 handle2519CWE94(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-02503-bf4a18120298f312", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2503CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02503-bf4a18120298f312", "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 Sample2503CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-00596-bf87e54f14ff83e3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_596_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-00596-bf87e54f14ff83e3", "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_596_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-03679-f0817f46555abd7c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3679_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-03679-f0817f46555abd7c", "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_3679_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-00408-adc1992dc5ef2851", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_408_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-00408-adc1992dc5ef2851", "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_408_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-02677-b6f191813c7f3bdc", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2677CWE20(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-02677-b6f191813c7f3bdc", "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 handle2677CWE20(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-02006-d3d79509bfd69974", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2006CWE416(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-02006-d3d79509bfd69974", "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 handle2006CWE416(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-01410-51f174ff322e6c78", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1410CWE79(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-01410-51f174ff322e6c78", "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 handle1410CWE79(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": "java-02753-de45abe5eea2ca58", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2753CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02753-de45abe5eea2ca58", "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 Sample2753CWE862 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-01803-3d1958419975a945", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1803CWE862(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-01803-3d1958419975a945", "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 handle1803CWE862(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-03734-962e668fbf01c06e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3734CWE770(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-03734-962e668fbf01c06e", "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 handle3734CWE770(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-00146-4c29ec0f9be2569d", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_146_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-00146-4c29ec0f9be2569d", "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_146_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-02479-5212880003b5f19c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2479CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest 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-02479-5212880003b5f19c", "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 Sample2479CWE611 {\n Object handle(javax.servlet.http.HttpServletRequest 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-01055-a4199b1de17e9a08", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1055CWE22(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-01055-a4199b1de17e9a08", "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 handle1055CWE22(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": "javascript-01999-02bfbd545d615925", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1999CWE200(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-01999-02bfbd545d615925", "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 handle1999CWE200(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-00268-b4144cb3aea0068e", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample268CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-00268-b4144cb3aea0068e", "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 Sample268CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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": "java-03842-0c43b0dab1271690", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3842CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03842-0c43b0dab1271690", "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 Sample3842CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02314-d150221762860c67", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2314CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-02314-d150221762860c67", "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 Sample2314CWE502 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-03440-b39ca59bec16b118", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3440CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03440-b39ca59bec16b118", "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 Sample3440CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-00102-50b287d8350c9f35", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample102CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00102-50b287d8350c9f35", "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 Sample102CWE476 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00148-c2a8bf8b35f5f220", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_148_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-00148-c2a8bf8b35f5f220", "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_148_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-01835-86c928e7df81b8fa", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1835CWE22(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-01835-86c928e7df81b8fa", "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 handle1835CWE22(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": "javascript-03568-161b6bfa12cb378e", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3568CWE78(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-03568-161b6bfa12cb378e", "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 handle3568CWE78(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": "cpp-01885-2f09e79290bdb935", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_1885_CWE_190(int count) {\n int bytes = count * 25;\n int bytes = count * 25;\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-01885-2f09e79290bdb935", "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_1885_CWE_190(int count) {\n int bytes = count * 25;\n int bytes = count * 25;\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-02981-4f56733431552994", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2981CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02981-4f56733431552994", "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 Sample2981CWE918 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02895-f34244475d0dafd5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_2895_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 76;\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-02895-f34244475d0dafd5", "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_2895_CWE_190(int count) {\n if (count > 1000000) return -1;\n int bytes = count * 76;\n return bytes;\n}\n```<|im_end|>\n<|im_start|>assistant\n{\"cwe\":[],\"is_vulnerable\":false,\"vulnerable_lines\":[]}<|im_end|>\n"} {"id": "java-02798-2e61c2f49a146faf", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2798CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02798-2e61c2f49a146faf", "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 Sample2798CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02159-30358c7542dec499", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2159_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-02159-30358c7542dec499", "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_2159_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": "c-00831-e05d219450af72d5", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_831_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-00831-e05d219450af72d5", "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_831_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-01909-761041a6e7c63d91", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1909_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-01909-761041a6e7c63d91", "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_1909_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-02135-fe7c7c540b4f5906", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_2135_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-02135-fe7c7c540b4f5906", "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_2135_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-03878-ec56819f9b9f056c", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3878CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03878-ec56819f9b9f056c", "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 Sample3878CWE284 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03975-48f715fe707ffbc8", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3975CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03975-48f715fe707ffbc8", "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 Sample3975CWE400 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02405-5873da1a7c18afc5", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2405_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-02405-5873da1a7c18afc5", "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_2405_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-02690-2763b255fff835ef", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2690CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02690-2763b255fff835ef", "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 Sample2690CWE79 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02783-b3acafe73949fe66", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2783CWE862(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-02783-b3acafe73949fe66", "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 handle2783CWE862(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-01663-06a8462f7787fb0a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1663_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-01663-06a8462f7787fb0a", "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_1663_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": "java-00493-91bf1d7114bb3cfa", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample493CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00493-91bf1d7114bb3cfa", "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 Sample493CWE121 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00523-c19addd319d64277", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle523CWE121(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-00523-c19addd319d64277", "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 handle523CWE121(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": "java-03929-7696063217180623", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3929CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03929-7696063217180623", "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 Sample3929CWE94 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-00082-3ed1a9f39b5496ba", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle82CWE77(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-00082-3ed1a9f39b5496ba", "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 handle82CWE77(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": "c-00372-dad2a55f03d49b2c", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_372_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-00372-dad2a55f03d49b2c", "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_372_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-02461-7f5f8f8788ddb5da", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_2461_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-02461-7f5f8f8788ddb5da", "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_2461_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-03432-3607e5759cca1af5", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3432_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-03432-3607e5759cca1af5", "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_3432_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": "java-01421-f7702c1b1a4c08fa", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1421CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01421-f7702c1b1a4c08fa", "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 Sample1421CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01977-822f6d8a90353049", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1977_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-01977-822f6d8a90353049", "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_1977_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-01796-395ddc073f5bf58b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_1796_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-01796-395ddc073f5bf58b", "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_1796_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": "javascript-00834-127f154be2460cd9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle834CWE770(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-00834-127f154be2460cd9", "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 handle834CWE770(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": "python-02659-64222bae2bc03277", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2659_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-02659-64222bae2bc03277", "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_2659_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-00066-a2eec949622597d6", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_66_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-00066-a2eec949622597d6", "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_66_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": "cpp-03518-b0047e861568d687", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_3518_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-03518-b0047e861568d687", "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_3518_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-03077-500a78339af3a909", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3077CWE798() {\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-03077-500a78339af3a909", "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 handle3077CWE798() {\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": "python-03978-6a1c70708485270f", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3978_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-03978-6a1c70708485270f", "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_3978_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": "cpp-00731-c8c99d2c9650adbf", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_731_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-00731-c8c99d2c9650adbf", "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_731_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-02221-d38c0fb92bdf9148", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2221_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-02221-d38c0fb92bdf9148", "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_2221_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-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": "python-01849-feb009af2c3fcbcc", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1849_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-01849-feb009af2c3fcbcc", "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_1849_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-02979-056ac1eed663ffea", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_2979_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-02979-056ac1eed663ffea", "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_2979_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-02264-04345f337d4a3aca", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2264CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-02264-04345f337d4a3aca", "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 Sample2264CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-01168-bbdf288b60245782", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1168CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-01168-bbdf288b60245782", "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 Sample1168CWE295 {\n Object handle(javax.servlet.http.HttpServletRequest req, 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-03238-f2833b330a323363", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3238_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-03238-f2833b330a323363", "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_3238_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-02824-eaa32704320a2fab", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2824CWE502(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-02824-eaa32704320a2fab", "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 handle2824CWE502(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-03171-5dc5161906072df7", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_3171_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-03171-5dc5161906072df7", "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_3171_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-01338-58ab64523286d445", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1338CWE284(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-01338-58ab64523286d445", "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 handle1338CWE284(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-03709-0e851e8959cb81b2", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3709CWE1321(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-03709-0e851e8959cb81b2", "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 handle3709CWE1321(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-02221-09837ac96200d010", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample2221CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02221-09837ac96200d010", "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 Sample2221CWE434 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-02169-43d13e4113352dc0", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2169_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-02169-43d13e4113352dc0", "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_2169_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": "c-00715-b828e026454b92b8", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_715_CWE_190(int count) {\n int bytes = count * 25;\n int bytes = count * 25;\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-00715-b828e026454b92b8", "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_715_CWE_190(int count) {\n int bytes = count * 25;\n int bytes = count * 25;\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": "javascript-02280-b0cd0831466e04b6", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2280CWE120(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-02280-b0cd0831466e04b6", "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 handle2280CWE120(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-03134-cd3dbeb52b824715", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3134CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-03134-cd3dbeb52b824715", "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 Sample3134CWE770 {\n Object handle(javax.servlet.http.HttpServletRequest 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-03528-a348d4506f437b70", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3528_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-03528-a348d4506f437b70", "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_3528_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-00482-ae7d0caffcd66188", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample482CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00482-ae7d0caffcd66188", "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 Sample482CWE352 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01003-973035b4bc89de4f", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1003_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-01003-973035b4bc89de4f", "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_1003_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-03573-4032c03c1a00286a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3573_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-03573-4032c03c1a00286a", "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_3573_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-02755-09834d6840a48b6d", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2755_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-02755-09834d6840a48b6d", "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_2755_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-03943-f7a146636ca5796a", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3943_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-03943-f7a146636ca5796a", "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_3943_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-00782-2a749ce61603eb2e", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_782_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-00782-2a749ce61603eb2e", "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_782_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": "cpp-00875-f48a80e28c107d57", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_875_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-00875-f48a80e28c107d57", "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_875_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": "cpp-02051-0f9af80dde7fe44e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_2051_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-02051-0f9af80dde7fe44e", "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_2051_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-02975-696d43e8c4bb71fc", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_2975_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-02975-696d43e8c4bb71fc", "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_2975_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-03325-ad4a89e276019177", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3325_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-03325-ad4a89e276019177", "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_3325_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-03819-372a32a32db393b4", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3819_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-03819-372a32a32db393b4", "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_3819_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-02099-c7da78ec8334d7f5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2099CWE94(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-02099-c7da78ec8334d7f5", "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 handle2099CWE94(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-03515-24d4a3c39b3bd41d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3515_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-03515-24d4a3c39b3bd41d", "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_3515_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-02048-bd9bc6cca0d53da8", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2048_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-02048-bd9bc6cca0d53da8", "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_2048_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-02795-5f3777d8f213e622", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2795CWE122(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-02795-5f3777d8f213e622", "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 handle2795CWE122(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-01305-f3856b374c6a4698", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1305_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-01305-f3856b374c6a4698", "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_1305_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-03952-4018d7bea0a34a74", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_3952_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-03952-4018d7bea0a34a74", "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_3952_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-03331-95b85d9a32e3c348", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3331_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-03331-95b85d9a32e3c348", "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_3331_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": "javascript-02989-0365e198fe9f8390", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2989CWE1321(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-02989-0365e198fe9f8390", "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 handle2989CWE1321(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-03009-f9cfb315763698a4", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample3009CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03009-f9cfb315763698a4", "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 Sample3009CWE200 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, java.io.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-03501-c9b996179433a582", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_3501_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-03501-c9b996179433a582", "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_3501_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-03342-8fb355a0ff2e9a7a", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3342CWE77(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-03342-8fb355a0ff2e9a7a", "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 handle3342CWE77(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-02189-c31a93f30a03b6a3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_2189_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-02189-c31a93f30a03b6a3", "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_2189_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-01558-f54cd7d91e2c003a", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_1558_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-01558-f54cd7d91e2c003a", "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_1558_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-02428-224afe07a92992c9", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2428CWE78(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-02428-224afe07a92992c9", "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 handle2428CWE78(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": "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-02132-2f21c83194b6efaa", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_2132_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-02132-2f21c83194b6efaa", "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_2132_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": "python-03806-5f4869143979c300", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_3806_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-03806-5f4869143979c300", "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_3806_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-01068-5a2a5e440799d7f3", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_1068_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-01068-5a2a5e440799d7f3", "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_1068_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-01987-95cddf43ebeb7c7b", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_1987_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-01987-95cddf43ebeb7c7b", "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_1987_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-01409-6729a02b01523a70", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1409_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-01409-6729a02b01523a70", "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_1409_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-01995-d5bb3b4052ef51a0", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_1995_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-01995-d5bb3b4052ef51a0", "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_1995_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-03022-1c0e862d620317bb", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_3022_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-03022-1c0e862d620317bb", "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_3022_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-01117-6788bfd8d9425836", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_1117_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-01117-6788bfd8d9425836", "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_1117_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": "python-00855-b7a88d6e9c20bd41", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_855_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-00855-b7a88d6e9c20bd41", "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_855_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-03702-2942cadc1190f6d3", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```cpp\n#include \n#include \n#include \n#include \nusing namespace std;\nvoid handle_3702_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-03702-2942cadc1190f6d3", "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_3702_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": "java-01730-4e476911f401877d", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1730CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-01730-4e476911f401877d", "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 Sample1730CWE306 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00018-0d1c87ce31ad5f6b", "language": "python", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this python code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```python\ndef handle_18_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-00018-0d1c87ce31ad5f6b", "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_18_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-01221-7c38cfc09f5e7e98", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\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_1221_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-01221-7c38cfc09f5e7e98", "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_1221_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-02102-959c3016f9055d56", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2102CWE476(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-02102-959c3016f9055d56", "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 handle2102CWE476(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-02920-486a6e3dfd4153ef", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_2920_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-02920-486a6e3dfd4153ef", "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_2920_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-00950-dcb6653141936a57", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle950CWE306(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-00950-dcb6653141936a57", "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 handle950CWE306(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-03382-fedc35faf8a9d127", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle3382CWE352(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-03382-fedc35faf8a9d127", "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 handle3382CWE352(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-00363-0ed07ffbea3800d5", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle363CWE862(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-00363-0ed07ffbea3800d5", "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 handle363CWE862(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": "cpp-00937-81fcd47a8e91fc9e", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\n\nReturn exactly this JSON 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_937_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-00937-81fcd47a8e91fc9e", "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_937_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-03130-1f71225d67a0cd7d", "language": "cpp", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this cpp code for security vulnerabilities.\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_3130_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-03130-1f71225d67a0cd7d", "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_3130_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-01141-4a234e93703feba5", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample1141CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest 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-01141-4a234e93703feba5", "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 Sample1141CWE89 {\n Object handle(javax.servlet.http.HttpServletRequest 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-01110-6b5ac3bac0acf83f", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle1110CWE79(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-01110-6b5ac3bac0acf83f", "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 handle1110CWE79(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-03335-e55bcddea6b0c506", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3335_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-03335-e55bcddea6b0c506", "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_3335_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-00383-14a274a608bec6b0", "language": "java", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this java code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```java\nimport java.util.*;\nclass Sample383CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-00383-14a274a608bec6b0", "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 Sample383CWE639 {\n Object handle(javax.servlet.http.HttpServletRequest req, java.sql.Connection c, String id, String host, String name, 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-02034-fbdf425d65a61aba", "language": "javascript", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this javascript code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```javascript\nfunction handle2034CWE787(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-02034-fbdf425d65a61aba", "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 handle2034CWE787(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-03474-f7add3016d590166", "language": "c", "messages": [{"content": "You are a secure code review assistant. Analyze the provided code and return only valid JSON with keys is_vulnerable, vulnerable_lines, and cwe. Use 1-based line numbers. Use empty arrays for safe code.", "role": "system"}, {"content": "Analyze this c code for security vulnerabilities.\n\nReturn exactly this JSON shape:\n{\"is_vulnerable\": boolean, \"vulnerable_lines\": integer[], \"cwe\": string[]}\n\n```c\n#include \n#include \n#include \nvoid handle_3474_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-03474-f7add3016d590166", "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_3474_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"}