Dataset Preview
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code: DatasetGenerationError
Exception: CastError
Message: Couldn't cast
name: string
pretty_name: string
category: string
samples: int64
language: string
license: string
format: list<item: string>
child 0, item: string
to
{'id': Value('string'), 'category': Value('string'), 'language': Value('string'), 'vulnerability_type': Value('string'), 'severity': Value('string'), 'cwe': Value('string'), 'owasp': Value('string'), 'domain': Value('string'), 'prompt': Value('string'), 'code': Value('string'), 'analysis': Value('string'), 'impact': Value('string'), 'remediation': Value('string'), 'secure_code': Value('string')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
num_examples, num_bytes = writer.finalize()
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 781, in finalize
self.write_rows_on_file()
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 663, in write_rows_on_file
self._write_table(table)
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 773, in _write_table
pa_table = table_cast(pa_table, self._schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
name: string
pretty_name: string
category: string
samples: int64
language: string
license: string
format: list<item: string>
child 0, item: string
to
{'id': Value('string'), 'category': Value('string'), 'language': Value('string'), 'vulnerability_type': Value('string'), 'severity': Value('string'), 'cwe': Value('string'), 'owasp': Value('string'), 'domain': Value('string'), 'prompt': Value('string'), 'code': Value('string'), 'analysis': Value('string'), 'impact': Value('string'), 'remediation': Value('string'), 'secure_code': Value('string')}
because column names don't match
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1361, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 940, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1683, in _prepare_split
for job_id, done, content in self._prepare_split_single(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1869, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
id string | category string | language string | vulnerability_type string | severity string | cwe string | owasp string | domain string | prompt string | code string | analysis string | impact string | remediation string | secure_code string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AISEC_00001 | security | bash | SQL Injection | Low | CWE-89 | A03:2021 Injection | uploads | Perform a security review of this Bash code in the uploads domain and explain the vulnerability. | query = f"SELECT * FROM users WHERE id = {user_id}" | User-controlled input is concatenated directly into the SQL query. | The issue can expose or manipulate order data in production. | Apply least privilege, input validation, and safe framework APIs. | cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,)) |
AISEC_00002 | security | sql | Cross-Site Scripting | Medium | CWE-79 | A03:2021 Injection | webhooks | Perform a security review of this SQL code in the webhooks domain and explain the vulnerability. | html = f"<div>{comment}</div>" | Untrusted content is rendered into HTML without encoding. | The issue can expose or manipulate cache_key data in production. | Apply least privilege, input validation, and safe framework APIs. | html = f"<div>{escape(comment)}</div>" |
AISEC_00003 | security | python | Insecure Direct Object Reference | High | CWE-639 | A01:2021 Broken Access Control | profiles | Perform a security review of this Python code in the profiles domain and explain the vulnerability. | record = db.get_invoice(invoice_id)
return record | Access is controlled only by identifier, not by authorization context. | The issue can expose or manipulate job data in production. | Apply least privilege, input validation, and safe framework APIs. | record = db.get_invoice_for_user(invoice_id, current_user.id)
return record |
AISEC_00004 | security | javascript | Hardcoded Secret | Critical | CWE-798 | A02:2021 Cryptographic Failures | checkout | Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability. | API_KEY = "sk_live_example_secret"
| A secret is embedded directly in source code. | The issue can expose or manipulate event data in production. | Apply least privilege, input validation, and safe framework APIs. | API_KEY = os.getenv("API_KEY")
|
AISEC_00005 | security | typescript | Path Traversal | Low | CWE-22 | A01:2021 Broken Access Control | inventory | Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability. | path = f"/uploads/{filename}"
open(path) | A user-controlled filename can escape the intended directory. | The issue can expose or manipulate payload data in production. | Apply least privilege, input validation, and safe framework APIs. | safe = os.path.basename(filename)
path = f"/uploads/{safe}"
open(path) |
AISEC_00006 | security | java | Command Injection | Medium | CWE-78 | A03:2021 Injection | recommendations | Perform a security review of this Java code in the recommendations domain and explain the vulnerability. | os.system(f"ping {host}") | Shell command is constructed from untrusted input. | The issue can expose or manipulate file data in production. | Apply least privilege, input validation, and safe framework APIs. | subprocess.run(["ping", host], check=True) |
AISEC_00007 | security | go | Weak Password Storage | High | CWE-916 | A02:2021 Cryptographic Failures | audit | Perform a security review of this Go code in the audit domain and explain the vulnerability. | stored = password
| Passwords must never be stored in plaintext. | The issue can expose or manipulate record data in production. | Apply least privilege, input validation, and safe framework APIs. | stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
|
AISEC_00008 | security | rust | Insecure Randomness | Critical | CWE-338 | A02:2021 Cryptographic Failures | logging | Perform a security review of this Rust code in the logging domain and explain the vulnerability. | token = random.randint(100000, 999999)
| Predictable randomness is not suitable for security tokens. | The issue can expose or manipulate metric data in production. | Apply least privilege, input validation, and safe framework APIs. | token = secrets.randbelow(900000) + 100000
|
AISEC_00009 | security | cpp | Missing Authentication | Low | CWE-306 | A01:2021 Broken Access Control | sync | Perform a security review of this C++ code in the sync domain and explain the vulnerability. | def export_report(request):
return build_report()
| Sensitive functionality is exposed without identity verification. | The issue can expose or manipulate notification data in production. | Apply least privilege, input validation, and safe framework APIs. | def export_report(request):
if not request.user.is_authenticated:
raise PermissionError()
return build_report()
|
AISEC_00010 | security | bash | SSRF | Medium | CWE-918 | A10:2021 Server-Side Request Forgery | streaming | Perform a security review of this Bash code in the streaming domain and explain the vulnerability. | response = requests.get(url)
| The server fetches arbitrary URLs without destination validation. | The issue can expose or manipulate task data in production. | Apply least privilege, input validation, and safe framework APIs. | allowed = is_allowed_host(url)
if allowed:
response = requests.get(url, timeout=3)
|
AISEC_00011 | security | sql | SQL Injection | High | CWE-89 | A03:2021 Injection | exports | Perform a security review of this SQL code in the exports domain and explain the vulnerability. | query = f"SELECT * FROM users WHERE id = {user_id}" | User-controlled input is concatenated directly into the SQL query. | The issue can expose or manipulate route data in production. | Apply least privilege, input validation, and safe framework APIs. | cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,)) |
AISEC_00012 | security | python | Cross-Site Scripting | Critical | CWE-79 | A03:2021 Injection | imports | Perform a security review of this Python code in the imports domain and explain the vulnerability. | html = f"<div>{comment}</div>" | Untrusted content is rendered into HTML without encoding. | The issue can expose or manipulate service data in production. | Apply least privilege, input validation, and safe framework APIs. | html = f"<div>{escape(comment)}</div>" |
AISEC_00013 | security | javascript | Insecure Direct Object Reference | Low | CWE-639 | A01:2021 Broken Access Control | payments | Perform a security review of this JavaScript code in the payments domain and explain the vulnerability. | record = db.get_invoice(invoice_id)
return record | Access is controlled only by identifier, not by authorization context. | The issue can expose or manipulate adapter data in production. | Apply least privilege, input validation, and safe framework APIs. | record = db.get_invoice_for_user(invoice_id, current_user.id)
return record |
AISEC_00014 | security | typescript | Hardcoded Secret | Medium | CWE-798 | A02:2021 Cryptographic Failures | messaging | Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability. | API_KEY = "sk_live_example_secret"
| A secret is embedded directly in source code. | The issue can expose or manipulate handler data in production. | Apply least privilege, input validation, and safe framework APIs. | API_KEY = os.getenv("API_KEY")
|
AISEC_00015 | security | java | Path Traversal | High | CWE-22 | A01:2021 Broken Access Control | admin | Perform a security review of this Java code in the admin domain and explain the vulnerability. | path = f"/uploads/{filename}"
open(path) | A user-controlled filename can escape the intended directory. | The issue can expose or manipulate controller data in production. | Apply least privilege, input validation, and safe framework APIs. | safe = os.path.basename(filename)
path = f"/uploads/{safe}"
open(path) |
AISEC_00016 | security | go | Command Injection | Critical | CWE-78 | A03:2021 Injection | dashboard | Perform a security review of this Go code in the dashboard domain and explain the vulnerability. | os.system(f"ping {host}") | Shell command is constructed from untrusted input. | The issue can expose or manipulate repository data in production. | Apply least privilege, input validation, and safe framework APIs. | subprocess.run(["ping", host], check=True) |
AISEC_00017 | security | rust | Weak Password Storage | Low | CWE-916 | A02:2021 Cryptographic Failures | billing | Perform a security review of this Rust code in the billing domain and explain the vulnerability. | stored = password
| Passwords must never be stored in plaintext. | The issue can expose or manipulate client data in production. | Apply least privilege, input validation, and safe framework APIs. | stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
|
AISEC_00018 | security | cpp | Insecure Randomness | Medium | CWE-338 | A02:2021 Cryptographic Failures | auth | Perform a security review of this C++ code in the auth domain and explain the vulnerability. | token = random.randint(100000, 999999)
| Predictable randomness is not suitable for security tokens. | The issue can expose or manipulate pipeline data in production. | Apply least privilege, input validation, and safe framework APIs. | token = secrets.randbelow(900000) + 100000
|
AISEC_00019 | security | bash | Missing Authentication | High | CWE-306 | A01:2021 Broken Access Control | search | Perform a security review of this Bash code in the search domain and explain the vulnerability. | def export_report(request):
return build_report()
| Sensitive functionality is exposed without identity verification. | The issue can expose or manipulate module data in production. | Apply least privilege, input validation, and safe framework APIs. | def export_report(request):
if not request.user.is_authenticated:
raise PermissionError()
return build_report()
|
AISEC_00020 | security | sql | SSRF | Critical | CWE-918 | A10:2021 Server-Side Request Forgery | analytics | Perform a security review of this SQL code in the analytics domain and explain the vulnerability. | response = requests.get(url)
| The server fetches arbitrary URLs without destination validation. | The issue can expose or manipulate invoice data in production. | Apply least privilege, input validation, and safe framework APIs. | allowed = is_allowed_host(url)
if allowed:
response = requests.get(url, timeout=3)
|
AISEC_00021 | security | python | SQL Injection | Low | CWE-89 | A03:2021 Injection | notifications | Perform a security review of this Python code in the notifications domain and explain the vulnerability. | query = f"SELECT * FROM users WHERE id = {user_id}" | User-controlled input is concatenated directly into the SQL query. | The issue can expose or manipulate session data in production. | Apply least privilege, input validation, and safe framework APIs. | cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,)) |
AISEC_00022 | security | javascript | Cross-Site Scripting | Medium | CWE-79 | A03:2021 Injection | reports | Perform a security review of this JavaScript code in the reports domain and explain the vulnerability. | html = f"<div>{comment}</div>" | Untrusted content is rendered into HTML without encoding. | The issue can expose or manipulate token data in production. | Apply least privilege, input validation, and safe framework APIs. | html = f"<div>{escape(comment)}</div>" |
AISEC_00023 | security | typescript | Insecure Direct Object Reference | High | CWE-639 | A01:2021 Broken Access Control | cache | Perform a security review of this TypeScript code in the cache domain and explain the vulnerability. | record = db.get_invoice(invoice_id)
return record | Access is controlled only by identifier, not by authorization context. | The issue can expose or manipulate queue data in production. | Apply least privilege, input validation, and safe framework APIs. | record = db.get_invoice_for_user(invoice_id, current_user.id)
return record |
AISEC_00024 | security | java | Hardcoded Secret | Critical | CWE-798 | A02:2021 Cryptographic Failures | scheduler | Perform a security review of this Java code in the scheduler domain and explain the vulnerability. | API_KEY = "sk_live_example_secret"
| A secret is embedded directly in source code. | The issue can expose or manipulate worker data in production. | Apply least privilege, input validation, and safe framework APIs. | API_KEY = os.getenv("API_KEY")
|
AISEC_00025 | security | go | Path Traversal | Low | CWE-22 | A01:2021 Broken Access Control | uploads | Perform a security review of this Go code in the uploads domain and explain the vulnerability. | path = f"/uploads/{filename}"
open(path) | A user-controlled filename can escape the intended directory. | The issue can expose or manipulate parser data in production. | Apply least privilege, input validation, and safe framework APIs. | safe = os.path.basename(filename)
path = f"/uploads/{safe}"
open(path) |
AISEC_00026 | security | rust | Command Injection | Medium | CWE-78 | A03:2021 Injection | webhooks | Perform a security review of this Rust code in the webhooks domain and explain the vulnerability. | os.system(f"ping {host}") | Shell command is constructed from untrusted input. | The issue can expose or manipulate report data in production. | Apply least privilege, input validation, and safe framework APIs. | subprocess.run(["ping", host], check=True) |
AISEC_00027 | security | cpp | Weak Password Storage | High | CWE-916 | A02:2021 Cryptographic Failures | profiles | Perform a security review of this C++ code in the profiles domain and explain the vulnerability. | stored = password
| Passwords must never be stored in plaintext. | The issue can expose or manipulate profile data in production. | Apply least privilege, input validation, and safe framework APIs. | stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
|
AISEC_00028 | security | bash | Insecure Randomness | Critical | CWE-338 | A02:2021 Cryptographic Failures | checkout | Perform a security review of this Bash code in the checkout domain and explain the vulnerability. | token = random.randint(100000, 999999)
| Predictable randomness is not suitable for security tokens. | The issue can expose or manipulate cart data in production. | Apply least privilege, input validation, and safe framework APIs. | token = secrets.randbelow(900000) + 100000
|
AISEC_00029 | security | sql | Missing Authentication | Low | CWE-306 | A01:2021 Broken Access Control | inventory | Perform a security review of this SQL code in the inventory domain and explain the vulnerability. | def export_report(request):
return build_report()
| Sensitive functionality is exposed without identity verification. | The issue can expose or manipulate order data in production. | Apply least privilege, input validation, and safe framework APIs. | def export_report(request):
if not request.user.is_authenticated:
raise PermissionError()
return build_report()
|
AISEC_00030 | security | python | SSRF | Medium | CWE-918 | A10:2021 Server-Side Request Forgery | recommendations | Perform a security review of this Python code in the recommendations domain and explain the vulnerability. | response = requests.get(url)
| The server fetches arbitrary URLs without destination validation. | The issue can expose or manipulate cache_key data in production. | Apply least privilege, input validation, and safe framework APIs. | allowed = is_allowed_host(url)
if allowed:
response = requests.get(url, timeout=3)
|
AISEC_00031 | security | javascript | SQL Injection | High | CWE-89 | A03:2021 Injection | audit | Perform a security review of this JavaScript code in the audit domain and explain the vulnerability. | query = f"SELECT * FROM users WHERE id = {user_id}" | User-controlled input is concatenated directly into the SQL query. | The issue can expose or manipulate job data in production. | Apply least privilege, input validation, and safe framework APIs. | cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,)) |
AISEC_00032 | security | typescript | Cross-Site Scripting | Critical | CWE-79 | A03:2021 Injection | logging | Perform a security review of this TypeScript code in the logging domain and explain the vulnerability. | html = f"<div>{comment}</div>" | Untrusted content is rendered into HTML without encoding. | The issue can expose or manipulate event data in production. | Apply least privilege, input validation, and safe framework APIs. | html = f"<div>{escape(comment)}</div>" |
AISEC_00033 | security | java | Insecure Direct Object Reference | Low | CWE-639 | A01:2021 Broken Access Control | sync | Perform a security review of this Java code in the sync domain and explain the vulnerability. | record = db.get_invoice(invoice_id)
return record | Access is controlled only by identifier, not by authorization context. | The issue can expose or manipulate payload data in production. | Apply least privilege, input validation, and safe framework APIs. | record = db.get_invoice_for_user(invoice_id, current_user.id)
return record |
AISEC_00034 | security | go | Hardcoded Secret | Medium | CWE-798 | A02:2021 Cryptographic Failures | streaming | Perform a security review of this Go code in the streaming domain and explain the vulnerability. | API_KEY = "sk_live_example_secret"
| A secret is embedded directly in source code. | The issue can expose or manipulate file data in production. | Apply least privilege, input validation, and safe framework APIs. | API_KEY = os.getenv("API_KEY")
|
AISEC_00035 | security | rust | Path Traversal | High | CWE-22 | A01:2021 Broken Access Control | exports | Perform a security review of this Rust code in the exports domain and explain the vulnerability. | path = f"/uploads/{filename}"
open(path) | A user-controlled filename can escape the intended directory. | The issue can expose or manipulate record data in production. | Apply least privilege, input validation, and safe framework APIs. | safe = os.path.basename(filename)
path = f"/uploads/{safe}"
open(path) |
AISEC_00036 | security | cpp | Command Injection | Critical | CWE-78 | A03:2021 Injection | imports | Perform a security review of this C++ code in the imports domain and explain the vulnerability. | os.system(f"ping {host}") | Shell command is constructed from untrusted input. | The issue can expose or manipulate metric data in production. | Apply least privilege, input validation, and safe framework APIs. | subprocess.run(["ping", host], check=True) |
AISEC_00037 | security | bash | Weak Password Storage | Low | CWE-916 | A02:2021 Cryptographic Failures | payments | Perform a security review of this Bash code in the payments domain and explain the vulnerability. | stored = password
| Passwords must never be stored in plaintext. | The issue can expose or manipulate notification data in production. | Apply least privilege, input validation, and safe framework APIs. | stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
|
AISEC_00038 | security | sql | Insecure Randomness | Medium | CWE-338 | A02:2021 Cryptographic Failures | messaging | Perform a security review of this SQL code in the messaging domain and explain the vulnerability. | token = random.randint(100000, 999999)
| Predictable randomness is not suitable for security tokens. | The issue can expose or manipulate task data in production. | Apply least privilege, input validation, and safe framework APIs. | token = secrets.randbelow(900000) + 100000
|
AISEC_00039 | security | python | Missing Authentication | High | CWE-306 | A01:2021 Broken Access Control | admin | Perform a security review of this Python code in the admin domain and explain the vulnerability. | def export_report(request):
return build_report()
| Sensitive functionality is exposed without identity verification. | The issue can expose or manipulate route data in production. | Apply least privilege, input validation, and safe framework APIs. | def export_report(request):
if not request.user.is_authenticated:
raise PermissionError()
return build_report()
|
AISEC_00040 | security | javascript | SSRF | Critical | CWE-918 | A10:2021 Server-Side Request Forgery | dashboard | Perform a security review of this JavaScript code in the dashboard domain and explain the vulnerability. | response = requests.get(url)
| The server fetches arbitrary URLs without destination validation. | The issue can expose or manipulate service data in production. | Apply least privilege, input validation, and safe framework APIs. | allowed = is_allowed_host(url)
if allowed:
response = requests.get(url, timeout=3)
|
AISEC_00041 | security | typescript | SQL Injection | Low | CWE-89 | A03:2021 Injection | billing | Perform a security review of this TypeScript code in the billing domain and explain the vulnerability. | query = f"SELECT * FROM users WHERE id = {user_id}" | User-controlled input is concatenated directly into the SQL query. | The issue can expose or manipulate adapter data in production. | Apply least privilege, input validation, and safe framework APIs. | cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,)) |
AISEC_00042 | security | java | Cross-Site Scripting | Medium | CWE-79 | A03:2021 Injection | auth | Perform a security review of this Java code in the auth domain and explain the vulnerability. | html = f"<div>{comment}</div>" | Untrusted content is rendered into HTML without encoding. | The issue can expose or manipulate handler data in production. | Apply least privilege, input validation, and safe framework APIs. | html = f"<div>{escape(comment)}</div>" |
AISEC_00043 | security | go | Insecure Direct Object Reference | High | CWE-639 | A01:2021 Broken Access Control | search | Perform a security review of this Go code in the search domain and explain the vulnerability. | record = db.get_invoice(invoice_id)
return record | Access is controlled only by identifier, not by authorization context. | The issue can expose or manipulate controller data in production. | Apply least privilege, input validation, and safe framework APIs. | record = db.get_invoice_for_user(invoice_id, current_user.id)
return record |
AISEC_00044 | security | rust | Hardcoded Secret | Critical | CWE-798 | A02:2021 Cryptographic Failures | analytics | Perform a security review of this Rust code in the analytics domain and explain the vulnerability. | API_KEY = "sk_live_example_secret"
| A secret is embedded directly in source code. | The issue can expose or manipulate repository data in production. | Apply least privilege, input validation, and safe framework APIs. | API_KEY = os.getenv("API_KEY")
|
AISEC_00045 | security | cpp | Path Traversal | Low | CWE-22 | A01:2021 Broken Access Control | notifications | Perform a security review of this C++ code in the notifications domain and explain the vulnerability. | path = f"/uploads/{filename}"
open(path) | A user-controlled filename can escape the intended directory. | The issue can expose or manipulate client data in production. | Apply least privilege, input validation, and safe framework APIs. | safe = os.path.basename(filename)
path = f"/uploads/{safe}"
open(path) |
AISEC_00046 | security | bash | Command Injection | Medium | CWE-78 | A03:2021 Injection | reports | Perform a security review of this Bash code in the reports domain and explain the vulnerability. | os.system(f"ping {host}") | Shell command is constructed from untrusted input. | The issue can expose or manipulate pipeline data in production. | Apply least privilege, input validation, and safe framework APIs. | subprocess.run(["ping", host], check=True) |
AISEC_00047 | security | sql | Weak Password Storage | High | CWE-916 | A02:2021 Cryptographic Failures | cache | Perform a security review of this SQL code in the cache domain and explain the vulnerability. | stored = password
| Passwords must never be stored in plaintext. | The issue can expose or manipulate module data in production. | Apply least privilege, input validation, and safe framework APIs. | stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
|
AISEC_00048 | security | python | Insecure Randomness | Critical | CWE-338 | A02:2021 Cryptographic Failures | scheduler | Perform a security review of this Python code in the scheduler domain and explain the vulnerability. | token = random.randint(100000, 999999)
| Predictable randomness is not suitable for security tokens. | The issue can expose or manipulate invoice data in production. | Apply least privilege, input validation, and safe framework APIs. | token = secrets.randbelow(900000) + 100000
|
AISEC_00049 | security | javascript | Missing Authentication | Low | CWE-306 | A01:2021 Broken Access Control | uploads | Perform a security review of this JavaScript code in the uploads domain and explain the vulnerability. | def export_report(request):
return build_report()
| Sensitive functionality is exposed without identity verification. | The issue can expose or manipulate session data in production. | Apply least privilege, input validation, and safe framework APIs. | def export_report(request):
if not request.user.is_authenticated:
raise PermissionError()
return build_report()
|
AISEC_00050 | security | typescript | SSRF | Medium | CWE-918 | A10:2021 Server-Side Request Forgery | webhooks | Perform a security review of this TypeScript code in the webhooks domain and explain the vulnerability. | response = requests.get(url)
| The server fetches arbitrary URLs without destination validation. | The issue can expose or manipulate token data in production. | Apply least privilege, input validation, and safe framework APIs. | allowed = is_allowed_host(url)
if allowed:
response = requests.get(url, timeout=3)
|
AISEC_00051 | security | java | SQL Injection | High | CWE-89 | A03:2021 Injection | profiles | Perform a security review of this Java code in the profiles domain and explain the vulnerability. | query = f"SELECT * FROM users WHERE id = {user_id}" | User-controlled input is concatenated directly into the SQL query. | The issue can expose or manipulate queue data in production. | Apply least privilege, input validation, and safe framework APIs. | cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,)) |
AISEC_00052 | security | go | Cross-Site Scripting | Critical | CWE-79 | A03:2021 Injection | checkout | Perform a security review of this Go code in the checkout domain and explain the vulnerability. | html = f"<div>{comment}</div>" | Untrusted content is rendered into HTML without encoding. | The issue can expose or manipulate worker data in production. | Apply least privilege, input validation, and safe framework APIs. | html = f"<div>{escape(comment)}</div>" |
AISEC_00053 | security | rust | Insecure Direct Object Reference | Low | CWE-639 | A01:2021 Broken Access Control | inventory | Perform a security review of this Rust code in the inventory domain and explain the vulnerability. | record = db.get_invoice(invoice_id)
return record | Access is controlled only by identifier, not by authorization context. | The issue can expose or manipulate parser data in production. | Apply least privilege, input validation, and safe framework APIs. | record = db.get_invoice_for_user(invoice_id, current_user.id)
return record |
AISEC_00054 | security | cpp | Hardcoded Secret | Medium | CWE-798 | A02:2021 Cryptographic Failures | recommendations | Perform a security review of this C++ code in the recommendations domain and explain the vulnerability. | API_KEY = "sk_live_example_secret"
| A secret is embedded directly in source code. | The issue can expose or manipulate report data in production. | Apply least privilege, input validation, and safe framework APIs. | API_KEY = os.getenv("API_KEY")
|
AISEC_00055 | security | bash | Path Traversal | High | CWE-22 | A01:2021 Broken Access Control | audit | Perform a security review of this Bash code in the audit domain and explain the vulnerability. | path = f"/uploads/{filename}"
open(path) | A user-controlled filename can escape the intended directory. | The issue can expose or manipulate profile data in production. | Apply least privilege, input validation, and safe framework APIs. | safe = os.path.basename(filename)
path = f"/uploads/{safe}"
open(path) |
AISEC_00056 | security | sql | Command Injection | Critical | CWE-78 | A03:2021 Injection | logging | Perform a security review of this SQL code in the logging domain and explain the vulnerability. | os.system(f"ping {host}") | Shell command is constructed from untrusted input. | The issue can expose or manipulate cart data in production. | Apply least privilege, input validation, and safe framework APIs. | subprocess.run(["ping", host], check=True) |
AISEC_00057 | security | python | Weak Password Storage | Low | CWE-916 | A02:2021 Cryptographic Failures | sync | Perform a security review of this Python code in the sync domain and explain the vulnerability. | stored = password
| Passwords must never be stored in plaintext. | The issue can expose or manipulate order data in production. | Apply least privilege, input validation, and safe framework APIs. | stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
|
AISEC_00058 | security | javascript | Insecure Randomness | Medium | CWE-338 | A02:2021 Cryptographic Failures | streaming | Perform a security review of this JavaScript code in the streaming domain and explain the vulnerability. | token = random.randint(100000, 999999)
| Predictable randomness is not suitable for security tokens. | The issue can expose or manipulate cache_key data in production. | Apply least privilege, input validation, and safe framework APIs. | token = secrets.randbelow(900000) + 100000
|
AISEC_00059 | security | typescript | Missing Authentication | High | CWE-306 | A01:2021 Broken Access Control | exports | Perform a security review of this TypeScript code in the exports domain and explain the vulnerability. | def export_report(request):
return build_report()
| Sensitive functionality is exposed without identity verification. | The issue can expose or manipulate job data in production. | Apply least privilege, input validation, and safe framework APIs. | def export_report(request):
if not request.user.is_authenticated:
raise PermissionError()
return build_report()
|
AISEC_00060 | security | java | SSRF | Critical | CWE-918 | A10:2021 Server-Side Request Forgery | imports | Perform a security review of this Java code in the imports domain and explain the vulnerability. | response = requests.get(url)
| The server fetches arbitrary URLs without destination validation. | The issue can expose or manipulate event data in production. | Apply least privilege, input validation, and safe framework APIs. | allowed = is_allowed_host(url)
if allowed:
response = requests.get(url, timeout=3)
|
AISEC_00061 | security | go | SQL Injection | Low | CWE-89 | A03:2021 Injection | payments | Perform a security review of this Go code in the payments domain and explain the vulnerability. | query = f"SELECT * FROM users WHERE id = {user_id}" | User-controlled input is concatenated directly into the SQL query. | The issue can expose or manipulate payload data in production. | Apply least privilege, input validation, and safe framework APIs. | cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,)) |
AISEC_00062 | security | rust | Cross-Site Scripting | Medium | CWE-79 | A03:2021 Injection | messaging | Perform a security review of this Rust code in the messaging domain and explain the vulnerability. | html = f"<div>{comment}</div>" | Untrusted content is rendered into HTML without encoding. | The issue can expose or manipulate file data in production. | Apply least privilege, input validation, and safe framework APIs. | html = f"<div>{escape(comment)}</div>" |
AISEC_00063 | security | cpp | Insecure Direct Object Reference | High | CWE-639 | A01:2021 Broken Access Control | admin | Perform a security review of this C++ code in the admin domain and explain the vulnerability. | record = db.get_invoice(invoice_id)
return record | Access is controlled only by identifier, not by authorization context. | The issue can expose or manipulate record data in production. | Apply least privilege, input validation, and safe framework APIs. | record = db.get_invoice_for_user(invoice_id, current_user.id)
return record |
AISEC_00064 | security | bash | Hardcoded Secret | Critical | CWE-798 | A02:2021 Cryptographic Failures | dashboard | Perform a security review of this Bash code in the dashboard domain and explain the vulnerability. | API_KEY = "sk_live_example_secret"
| A secret is embedded directly in source code. | The issue can expose or manipulate metric data in production. | Apply least privilege, input validation, and safe framework APIs. | API_KEY = os.getenv("API_KEY")
|
AISEC_00065 | security | sql | Path Traversal | Low | CWE-22 | A01:2021 Broken Access Control | billing | Perform a security review of this SQL code in the billing domain and explain the vulnerability. | path = f"/uploads/{filename}"
open(path) | A user-controlled filename can escape the intended directory. | The issue can expose or manipulate notification data in production. | Apply least privilege, input validation, and safe framework APIs. | safe = os.path.basename(filename)
path = f"/uploads/{safe}"
open(path) |
AISEC_00066 | security | python | Command Injection | Medium | CWE-78 | A03:2021 Injection | auth | Perform a security review of this Python code in the auth domain and explain the vulnerability. | os.system(f"ping {host}") | Shell command is constructed from untrusted input. | The issue can expose or manipulate task data in production. | Apply least privilege, input validation, and safe framework APIs. | subprocess.run(["ping", host], check=True) |
AISEC_00067 | security | javascript | Weak Password Storage | High | CWE-916 | A02:2021 Cryptographic Failures | search | Perform a security review of this JavaScript code in the search domain and explain the vulnerability. | stored = password
| Passwords must never be stored in plaintext. | The issue can expose or manipulate route data in production. | Apply least privilege, input validation, and safe framework APIs. | stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
|
AISEC_00068 | security | typescript | Insecure Randomness | Critical | CWE-338 | A02:2021 Cryptographic Failures | analytics | Perform a security review of this TypeScript code in the analytics domain and explain the vulnerability. | token = random.randint(100000, 999999)
| Predictable randomness is not suitable for security tokens. | The issue can expose or manipulate service data in production. | Apply least privilege, input validation, and safe framework APIs. | token = secrets.randbelow(900000) + 100000
|
AISEC_00069 | security | java | Missing Authentication | Low | CWE-306 | A01:2021 Broken Access Control | notifications | Perform a security review of this Java code in the notifications domain and explain the vulnerability. | def export_report(request):
return build_report()
| Sensitive functionality is exposed without identity verification. | The issue can expose or manipulate adapter data in production. | Apply least privilege, input validation, and safe framework APIs. | def export_report(request):
if not request.user.is_authenticated:
raise PermissionError()
return build_report()
|
AISEC_00070 | security | go | SSRF | Medium | CWE-918 | A10:2021 Server-Side Request Forgery | reports | Perform a security review of this Go code in the reports domain and explain the vulnerability. | response = requests.get(url)
| The server fetches arbitrary URLs without destination validation. | The issue can expose or manipulate handler data in production. | Apply least privilege, input validation, and safe framework APIs. | allowed = is_allowed_host(url)
if allowed:
response = requests.get(url, timeout=3)
|
AISEC_00071 | security | rust | SQL Injection | High | CWE-89 | A03:2021 Injection | cache | Perform a security review of this Rust code in the cache domain and explain the vulnerability. | query = f"SELECT * FROM users WHERE id = {user_id}" | User-controlled input is concatenated directly into the SQL query. | The issue can expose or manipulate controller data in production. | Apply least privilege, input validation, and safe framework APIs. | cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,)) |
AISEC_00072 | security | cpp | Cross-Site Scripting | Critical | CWE-79 | A03:2021 Injection | scheduler | Perform a security review of this C++ code in the scheduler domain and explain the vulnerability. | html = f"<div>{comment}</div>" | Untrusted content is rendered into HTML without encoding. | The issue can expose or manipulate repository data in production. | Apply least privilege, input validation, and safe framework APIs. | html = f"<div>{escape(comment)}</div>" |
AISEC_00073 | security | bash | Insecure Direct Object Reference | Low | CWE-639 | A01:2021 Broken Access Control | uploads | Perform a security review of this Bash code in the uploads domain and explain the vulnerability. | record = db.get_invoice(invoice_id)
return record | Access is controlled only by identifier, not by authorization context. | The issue can expose or manipulate client data in production. | Apply least privilege, input validation, and safe framework APIs. | record = db.get_invoice_for_user(invoice_id, current_user.id)
return record |
AISEC_00074 | security | sql | Hardcoded Secret | Medium | CWE-798 | A02:2021 Cryptographic Failures | webhooks | Perform a security review of this SQL code in the webhooks domain and explain the vulnerability. | API_KEY = "sk_live_example_secret"
| A secret is embedded directly in source code. | The issue can expose or manipulate pipeline data in production. | Apply least privilege, input validation, and safe framework APIs. | API_KEY = os.getenv("API_KEY")
|
AISEC_00075 | security | python | Path Traversal | High | CWE-22 | A01:2021 Broken Access Control | profiles | Perform a security review of this Python code in the profiles domain and explain the vulnerability. | path = f"/uploads/{filename}"
open(path) | A user-controlled filename can escape the intended directory. | The issue can expose or manipulate module data in production. | Apply least privilege, input validation, and safe framework APIs. | safe = os.path.basename(filename)
path = f"/uploads/{safe}"
open(path) |
AISEC_00076 | security | javascript | Command Injection | Critical | CWE-78 | A03:2021 Injection | checkout | Perform a security review of this JavaScript code in the checkout domain and explain the vulnerability. | os.system(f"ping {host}") | Shell command is constructed from untrusted input. | The issue can expose or manipulate invoice data in production. | Apply least privilege, input validation, and safe framework APIs. | subprocess.run(["ping", host], check=True) |
AISEC_00077 | security | typescript | Weak Password Storage | Low | CWE-916 | A02:2021 Cryptographic Failures | inventory | Perform a security review of this TypeScript code in the inventory domain and explain the vulnerability. | stored = password
| Passwords must never be stored in plaintext. | The issue can expose or manipulate session data in production. | Apply least privilege, input validation, and safe framework APIs. | stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
|
AISEC_00078 | security | java | Insecure Randomness | Medium | CWE-338 | A02:2021 Cryptographic Failures | recommendations | Perform a security review of this Java code in the recommendations domain and explain the vulnerability. | token = random.randint(100000, 999999)
| Predictable randomness is not suitable for security tokens. | The issue can expose or manipulate token data in production. | Apply least privilege, input validation, and safe framework APIs. | token = secrets.randbelow(900000) + 100000
|
AISEC_00079 | security | go | Missing Authentication | High | CWE-306 | A01:2021 Broken Access Control | audit | Perform a security review of this Go code in the audit domain and explain the vulnerability. | def export_report(request):
return build_report()
| Sensitive functionality is exposed without identity verification. | The issue can expose or manipulate queue data in production. | Apply least privilege, input validation, and safe framework APIs. | def export_report(request):
if not request.user.is_authenticated:
raise PermissionError()
return build_report()
|
AISEC_00080 | security | rust | SSRF | Critical | CWE-918 | A10:2021 Server-Side Request Forgery | logging | Perform a security review of this Rust code in the logging domain and explain the vulnerability. | response = requests.get(url)
| The server fetches arbitrary URLs without destination validation. | The issue can expose or manipulate worker data in production. | Apply least privilege, input validation, and safe framework APIs. | allowed = is_allowed_host(url)
if allowed:
response = requests.get(url, timeout=3)
|
AISEC_00081 | security | cpp | SQL Injection | Low | CWE-89 | A03:2021 Injection | sync | Perform a security review of this C++ code in the sync domain and explain the vulnerability. | query = f"SELECT * FROM users WHERE id = {user_id}" | User-controlled input is concatenated directly into the SQL query. | The issue can expose or manipulate parser data in production. | Apply least privilege, input validation, and safe framework APIs. | cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,)) |
AISEC_00082 | security | bash | Cross-Site Scripting | Medium | CWE-79 | A03:2021 Injection | streaming | Perform a security review of this Bash code in the streaming domain and explain the vulnerability. | html = f"<div>{comment}</div>" | Untrusted content is rendered into HTML without encoding. | The issue can expose or manipulate report data in production. | Apply least privilege, input validation, and safe framework APIs. | html = f"<div>{escape(comment)}</div>" |
AISEC_00083 | security | sql | Insecure Direct Object Reference | High | CWE-639 | A01:2021 Broken Access Control | exports | Perform a security review of this SQL code in the exports domain and explain the vulnerability. | record = db.get_invoice(invoice_id)
return record | Access is controlled only by identifier, not by authorization context. | The issue can expose or manipulate profile data in production. | Apply least privilege, input validation, and safe framework APIs. | record = db.get_invoice_for_user(invoice_id, current_user.id)
return record |
AISEC_00084 | security | python | Hardcoded Secret | Critical | CWE-798 | A02:2021 Cryptographic Failures | imports | Perform a security review of this Python code in the imports domain and explain the vulnerability. | API_KEY = "sk_live_example_secret"
| A secret is embedded directly in source code. | The issue can expose or manipulate cart data in production. | Apply least privilege, input validation, and safe framework APIs. | API_KEY = os.getenv("API_KEY")
|
AISEC_00085 | security | javascript | Path Traversal | Low | CWE-22 | A01:2021 Broken Access Control | payments | Perform a security review of this JavaScript code in the payments domain and explain the vulnerability. | path = f"/uploads/{filename}"
open(path) | A user-controlled filename can escape the intended directory. | The issue can expose or manipulate order data in production. | Apply least privilege, input validation, and safe framework APIs. | safe = os.path.basename(filename)
path = f"/uploads/{safe}"
open(path) |
AISEC_00086 | security | typescript | Command Injection | Medium | CWE-78 | A03:2021 Injection | messaging | Perform a security review of this TypeScript code in the messaging domain and explain the vulnerability. | os.system(f"ping {host}") | Shell command is constructed from untrusted input. | The issue can expose or manipulate cache_key data in production. | Apply least privilege, input validation, and safe framework APIs. | subprocess.run(["ping", host], check=True) |
AISEC_00087 | security | java | Weak Password Storage | High | CWE-916 | A02:2021 Cryptographic Failures | admin | Perform a security review of this Java code in the admin domain and explain the vulnerability. | stored = password
| Passwords must never be stored in plaintext. | The issue can expose or manipulate job data in production. | Apply least privilege, input validation, and safe framework APIs. | stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
|
AISEC_00088 | security | go | Insecure Randomness | Critical | CWE-338 | A02:2021 Cryptographic Failures | dashboard | Perform a security review of this Go code in the dashboard domain and explain the vulnerability. | token = random.randint(100000, 999999)
| Predictable randomness is not suitable for security tokens. | The issue can expose or manipulate event data in production. | Apply least privilege, input validation, and safe framework APIs. | token = secrets.randbelow(900000) + 100000
|
AISEC_00089 | security | rust | Missing Authentication | Low | CWE-306 | A01:2021 Broken Access Control | billing | Perform a security review of this Rust code in the billing domain and explain the vulnerability. | def export_report(request):
return build_report()
| Sensitive functionality is exposed without identity verification. | The issue can expose or manipulate payload data in production. | Apply least privilege, input validation, and safe framework APIs. | def export_report(request):
if not request.user.is_authenticated:
raise PermissionError()
return build_report()
|
AISEC_00090 | security | cpp | SSRF | Medium | CWE-918 | A10:2021 Server-Side Request Forgery | auth | Perform a security review of this C++ code in the auth domain and explain the vulnerability. | response = requests.get(url)
| The server fetches arbitrary URLs without destination validation. | The issue can expose or manipulate file data in production. | Apply least privilege, input validation, and safe framework APIs. | allowed = is_allowed_host(url)
if allowed:
response = requests.get(url, timeout=3)
|
AISEC_00091 | security | bash | SQL Injection | High | CWE-89 | A03:2021 Injection | search | Perform a security review of this Bash code in the search domain and explain the vulnerability. | query = f"SELECT * FROM users WHERE id = {user_id}" | User-controlled input is concatenated directly into the SQL query. | The issue can expose or manipulate record data in production. | Apply least privilege, input validation, and safe framework APIs. | cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,)) |
AISEC_00092 | security | sql | Cross-Site Scripting | Critical | CWE-79 | A03:2021 Injection | analytics | Perform a security review of this SQL code in the analytics domain and explain the vulnerability. | html = f"<div>{comment}</div>" | Untrusted content is rendered into HTML without encoding. | The issue can expose or manipulate metric data in production. | Apply least privilege, input validation, and safe framework APIs. | html = f"<div>{escape(comment)}</div>" |
AISEC_00093 | security | python | Insecure Direct Object Reference | Low | CWE-639 | A01:2021 Broken Access Control | notifications | Perform a security review of this Python code in the notifications domain and explain the vulnerability. | record = db.get_invoice(invoice_id)
return record | Access is controlled only by identifier, not by authorization context. | The issue can expose or manipulate notification data in production. | Apply least privilege, input validation, and safe framework APIs. | record = db.get_invoice_for_user(invoice_id, current_user.id)
return record |
AISEC_00094 | security | javascript | Hardcoded Secret | Medium | CWE-798 | A02:2021 Cryptographic Failures | reports | Perform a security review of this JavaScript code in the reports domain and explain the vulnerability. | API_KEY = "sk_live_example_secret"
| A secret is embedded directly in source code. | The issue can expose or manipulate task data in production. | Apply least privilege, input validation, and safe framework APIs. | API_KEY = os.getenv("API_KEY")
|
AISEC_00095 | security | typescript | Path Traversal | High | CWE-22 | A01:2021 Broken Access Control | cache | Perform a security review of this TypeScript code in the cache domain and explain the vulnerability. | path = f"/uploads/{filename}"
open(path) | A user-controlled filename can escape the intended directory. | The issue can expose or manipulate route data in production. | Apply least privilege, input validation, and safe framework APIs. | safe = os.path.basename(filename)
path = f"/uploads/{safe}"
open(path) |
AISEC_00096 | security | java | Command Injection | Critical | CWE-78 | A03:2021 Injection | scheduler | Perform a security review of this Java code in the scheduler domain and explain the vulnerability. | os.system(f"ping {host}") | Shell command is constructed from untrusted input. | The issue can expose or manipulate service data in production. | Apply least privilege, input validation, and safe framework APIs. | subprocess.run(["ping", host], check=True) |
AISEC_00097 | security | go | Weak Password Storage | Low | CWE-916 | A02:2021 Cryptographic Failures | uploads | Perform a security review of this Go code in the uploads domain and explain the vulnerability. | stored = password
| Passwords must never be stored in plaintext. | The issue can expose or manipulate adapter data in production. | Apply least privilege, input validation, and safe framework APIs. | stored = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
|
AISEC_00098 | security | rust | Insecure Randomness | Medium | CWE-338 | A02:2021 Cryptographic Failures | webhooks | Perform a security review of this Rust code in the webhooks domain and explain the vulnerability. | token = random.randint(100000, 999999)
| Predictable randomness is not suitable for security tokens. | The issue can expose or manipulate handler data in production. | Apply least privilege, input validation, and safe framework APIs. | token = secrets.randbelow(900000) + 100000
|
AISEC_00099 | security | cpp | Missing Authentication | High | CWE-306 | A01:2021 Broken Access Control | profiles | Perform a security review of this C++ code in the profiles domain and explain the vulnerability. | def export_report(request):
return build_report()
| Sensitive functionality is exposed without identity verification. | The issue can expose or manipulate controller data in production. | Apply least privilege, input validation, and safe framework APIs. | def export_report(request):
if not request.user.is_authenticated:
raise PermissionError()
return build_report()
|
AISEC_00100 | security | bash | SSRF | Critical | CWE-918 | A10:2021 Server-Side Request Forgery | checkout | Perform a security review of this Bash code in the checkout domain and explain the vulnerability. | response = requests.get(url)
| The server fetches arbitrary URLs without destination validation. | The issue can expose or manipulate repository data in production. | Apply least privilege, input validation, and safe framework APIs. | allowed = is_allowed_host(url)
if allowed:
response = requests.get(url, timeout=3)
|
End of preview.
AIForge-03-Security
Security Dataset for AI and Programming Tasks
Overview
AIForge-03-Security is a curated English dataset designed for AI systems working on security tasks in software engineering and programming.
Contents
data.jsonldata.jsonmetadata.json
Use Cases
- AI agent training
- Supervised fine-tuning
- Evaluation and benchmarking
- Software engineering research
Example Record
{
"id": "AISEC_00001",
"category": "security",
"language": "bash",
"vulnerability_type": "SQL Injection",
"severity": "Low",
"cwe": "CWE-89",
"owasp": "A03:2021 Injection",
"domain": "uploads",
"prompt": "Perform a security review of this Bash code in the uploads domain and explain the vulnerability.",
"code": "query = f\"SELECT * FROM users WHERE id = {user_id}\"",
"analysis": "User-controlled input is concatenated directly into the SQL query.",
"impact": "The issue can expose or manipulate order data in production.",
"remediation": "Apply least privilege, input validation, and safe framework APIs.",
"secure_code": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))"
}
License
Released under CC BY 4.0.
Source
JumpLander
- Downloads last month
- 64