File size: 738 Bytes
afbe1d6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# CWE-Code_Vulnerability_Security_DPO

This dataset adds a `cwe_ids` field to each row in
`CyberNative/Code_Vulnerability_Security_DPO` by querying an LLM
with the row's vulnerability description and rejected code sample.

## How the CWE IDs were obtained

- Model: gpt-5-mini via the OpenAI Responses API
- Reasoning: low effort
- Tooling: `web_search` limited to `cwe.mitre.org`
- Prompt format:

```
Given the following description of a CWE and a code segment that replicates it:
Description: {desc}

Code: {vuln_code}

What's the most likely CWE ID associated with this vulnerability? Answer in the following format:

## Answer:
CWE-#: CWE Name
```

- Parsing: lines starting with `CWE-` are extracted and the numeric ID is retained.