Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringclasses
6 values
source_dataset
stringclasses
1 value
cwe
stringclasses
6 values
language
stringclasses
2 values
vulnerable_code
stringclasses
6 values
secure_code
stringclasses
6 values
url
stringclasses
1 value
repository
stringclasses
1 value
commit_hash
stringclasses
1 value
timestamp
stringclasses
1 value
cvss_score
stringclasses
1 value
severity
stringclasses
1 value
metadata
dict
juliet_0
Juliet
CWE-119
c
void bad_function(char *src) { char dst[10]; strcpy(dst, src); }
void good_function(char *src) { char dst[10]; strncpy(dst, src, sizeof(dst) - 1); dst[sizeof(dst) - 1] = '\0'; }
https://samate.nist.gov/SARD/test-suites/118
high
{ "cwe_id": "CWE-119", "dataset_source": "Juliet", "language": "c", "test_id": "CWE119_buffer_overflow_001", "test_type": "nist_synthetic" }
juliet_1
Juliet
CWE-120
c
void bad_input() { char buffer[256]; gets(buffer); }
void good_input() { char buffer[256]; fgets(buffer, sizeof(buffer), stdin); }
https://samate.nist.gov/SARD/test-suites/118
high
{ "cwe_id": "CWE-120", "dataset_source": "Juliet", "language": "c", "test_id": "CWE120_gets_001", "test_type": "nist_synthetic" }
juliet_2
Juliet
CWE-190
c
int add(int a, int b) { return a + b; }
int add(int a, int b) { if (a > 0 && b > INT_MAX - a) return -1; return a + b; }
https://samate.nist.gov/SARD/test-suites/118
high
{ "cwe_id": "CWE-190", "dataset_source": "Juliet", "language": "c", "test_id": "CWE190_integer_overflow_001", "test_type": "nist_synthetic" }
juliet_3
Juliet
CWE-369
c
int divide(int numerator, int denominator) { return numerator / denominator; }
int divide(int numerator, int denominator) { if (denominator == 0) return -1; return numerator / denominator; }
https://samate.nist.gov/SARD/test-suites/118
high
{ "cwe_id": "CWE-369", "dataset_source": "Juliet", "language": "c", "test_id": "CWE369_divide_by_zero_001", "test_type": "nist_synthetic" }
juliet_4
Juliet
CWE-476
java
public int getValue(Object obj) { return obj.hashCode(); }
public int getValue(Object obj) { if (obj == null) return -1; return obj.hashCode(); }
https://samate.nist.gov/SARD/test-suites/118
high
{ "cwe_id": "CWE-476", "dataset_source": "Juliet", "language": "java", "test_id": "CWE476_null_deref_001", "test_type": "nist_synthetic" }
juliet_5
Juliet
CWE-78
java
public String execute(String cmd) { return Runtime.getRuntime().exec(cmd).toString(); }
public String execute(String cmd) { String[] safe_cmd = {"/bin/sh", "-c", cmd}; return Runtime.getRuntime().exec(safe_cmd).toString(); }
https://samate.nist.gov/SARD/test-suites/118
high
{ "cwe_id": "CWE-78", "dataset_source": "Juliet", "language": "java", "test_id": "CWE78_injection_001", "test_type": "nist_synthetic" }
README.md exists but content is empty.
Downloads last month
35