Younis2003/CodeLlama_for_code_security
Text Generation β’ Updated β’ 1
text stringlengths 1.49k 11.6k |
|---|
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. P... |
Dataset ID: Younis2003/secure_dataset_cvefixes
SecureDataset CVEFixes is a curated, high-quality dataset designed for secure code remediation and vulnerability analysis. It contains real-world vulnerable code snippets paired with their security fixes, extracted from actual CVE patches across multiple programming languages.
| Split | Samples |
|---|---|
| Train | 2,189 |
| Validation | 281 |
| Test | 262 |
| Total | 2,732 |
| Task | Description |
|---|---|
| Supervised Fine-Tuning (SFT) | Train LLMs to generate secure code fixes from vulnerable inputs |
| Vulnerability Detection | Identify security flaws in source code |
| Code Remediation | Automatically patch security vulnerabilities |
| Security Education | Learn from real-world CVE fixes and CWE patterns |
The dataset covers 8 major programming languages with the following distribution:
| Language | Train | Validation | Test |
|---|---|---|---|
| C | 707 | 89 | 66 |
| PHP | 570 | 83 | 71 |
| Python | 253 | 29 | 33 |
| JavaScript | 211 | 23 | 25 |
| C++ | 143 | 10 | 13 |
| Java | 112 | 19 | 22 |
| Ruby | 98 | 15 | 20 |
| Go | 95 | 13 | 12 |
{
"text": "string" # Formatted prompt containing vulnerable code, fixed code, and metadata
}
Each example follows a structured prompt template:
### System:
You are a secure code remediation and vulnerability analysis engine.
You do not provide free-form explanations.
You do not include external references or links.
You only return structured, deterministic, and security-focused outputs.
### Task:
Given vulnerable source code, perform the following steps:
1. Produce a secure and correct version of the code.
2. Explain the vulnerability using structured security metadata.
### Programming Language:
{row['language']}
### Vulnerable Code:
{row['vulnerable_code']}
### Constraints:
- Do NOT introduce new functionality.
- Do NOT change the intended behavior.
- Do NOT refactor unless required for security.
- Do NOT add comments unless required for security.
- Follow best security practices.
### Response Format:
Return the response EXACTLY in the format below.
### Fixed Code:
{row['fixed_code']}
### Vulnerability Explanation:
CVE: {row['cve_id']}
CVE Description:
{row['cve_description']}
CWE: {row['cwe_id']}
CWE Description:
{row['cwe_description']}
hitoshura25/cvefixes| CWE ID | Count | Description |
|---|---|---|
| CWE-79 | 1,878 | Cross-site Scripting (XSS) |
| CWE-125 | 604 | Out-of-bounds Read |
| CWE-787 | 491 | Out-of-bounds Write |
| CWE-20 | 432 | Improper Input Validation |
| CWE-89 | 429 | SQL Injection |
If you use this dataset in your research, please cite:
@dataset{secure_dataset_cvefixes,
author = {Younis2003},
title = {SecureDataset CVEFixes: A Curated Dataset for Secure Code Remediation},
year = {2024},
url = {https://huggingface.co/datasets/Younis2003/secure_dataset_cvefixes}
}
Last updated: 2024