task_categories:text-generation language:en license:apache-2.0 size_categories:n<1K format:json modality:text library:datasets library:pandas library:mlcroissant library:polars region:us
---
license: apache-2.0
task_categories:
- text-generation
language:
- en
pretty_name: cwe-weaknesses
size_categories:
- n<1K
---

## Introduction
This dataset is based on the complete XML file of [CWE List Version 4.14](https://cwe.mitre.org/data/index.html) and is intended to provide researchers and security experts with structured data on Common Weakness Enumeration (CWE) for software and hardware. The dataset contains **963** entries in Alpaca format, each providing detailed information about a specific weakness.

## Dataset Structure
Each entry in the dataset includes the following fields:

*ID*: The unique identifier for the weakness (e.g., CWE-1004).
*Name*: The name of the weakness, describing the essence of the issue (e.g., Sensitive Cookie Without 'HttpOnly' Flag).

*Abstraction*: The level of abstraction indicating the conceptual level of the weakness (e.g., Variant).

*Structure*: The type of weakness structure (e.g., Simple).

*Status*: The completion status of the weakness description (e.g., Incomplete).

*Description*: A brief description of the issue regarding sensitive cookies without the HttpOnly flag.

*Extended Description*: Provides a more detailed description of the issue, explaining the role of the HttpOnly flag and the security risks associated with not using it.

*Related Weaknesses*: Describes other weaknesses related to this one.

*Applicable Platforms*: Describes the programming languages and technology platforms to which this weakness applies.

*Background Details*: Provides background information about HTTP cookies, explaining how cookies work and their purposes.

*Modes Of Introduction*: Describes the phases during the software development cycle in which this weakness may be introduced.

*Likelihood Of Exploit*: Indicates the likelihood that this weakness will be exploited (e.g., Medium).

*Common Consequences*: Describes the potential impacts on the system if this weakness is exploited.

*Detection Methods*: Describes methods for detecting the presence of this weakness.

*Potential Mitigations*: Provides recommended measures for mitigating this weakness.

*Demonstrative Examples*: Provides example code to demonstrate this weakness and how it can be mitigated.

*Observed Examples*: Lists observed instances of this kind of weakness in the real world, including related CVE numbers.

*References*: Provides links to related reference materials.

*Mapping Notes*: Contains notes on the mapping and use of this weakness entry.

*Content History*: Provides the historical revision record of the content of this weakness description.

## Usage Instructions
This dataset is suitable for security research, educational training, tool development, and more. Users can directly load the dataset via the Hugging Face Datasets library for analysis and research.

```python
Copy code
from datasets import load_dataset

dataset = load_dataset("bayuncao/cwec-v4.14-weaknesses-1.0")
```