https://github.com/bilgenurbekar/cve2cpe
This is a study that creates CPEs using LLM from CVE records.
https://github.com/bilgenurbekar/cve2cpe
langchain-python llama3 nvdlib ollama python
Last synced: about 1 year ago
JSON representation
This is a study that creates CPEs using LLM from CVE records.
- Host: GitHub
- URL: https://github.com/bilgenurbekar/cve2cpe
- Owner: BilgeNurBekar
- Created: 2024-08-11T14:07:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-11T16:03:52.000Z (almost 2 years ago)
- Last Synced: 2025-03-28T11:39:41.161Z (about 1 year ago)
- Topics: langchain-python, llama3, nvdlib, ollama, python
- Language: Python
- Homepage:
- Size: 54.7 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CVE to CPE Converter
## Description
The CVE to CPE Converter is a Python application developed to automatically generate CPE (Common Platform Enumeration) records from CVE descriptions using big language model (LLM). This project is designed to facilitate the management of security vulnerabilities by easily and quickly converting CVE information into a standardized CPE format.
## Features
- **Up-to-Date CVE Data**: Processes daily updated CVE data.
- **CPE Conversion**: Generates CPE records from CVE descriptions.
- **Data Storage**: Stores data in local daily JSON files.
- **Ollama Integration**: Utilizes Ollama for processing CVE and CPE data.
- **Streamlit Application**: Provides a web-based interface.
## Project Flow Chart

## Requirements
The following requirements are necessary for the proper functioning of this project:
### Python and Virtual Environment
1. **Python**: Requires Python 3.6 or higher.
2. **Virtual Environment**: It is recommended to create an isolated Python environment to run the project.
### Language Model Usage
- **Ollama**: Requires the Ollama language model for processing CVE and CPE data. Version: 0.3.0
- **Llama3**: With 8B parameters.
### Installation
Follow these steps to set up the project on your local machine:
1. **Clone the Repository**:
```bash
git clone https://github.com/BilgeNurBekar/CVE2CPE.git
cd CVE2CPE
```
2. **Create and Activate a Virtual Environment**:
- **Windows**:
```bash
python -m venv venv
venv\Scripts\activate
```
- **Linux/MacOS**:
```bash
python3 -m venv venv
source venv/bin/activate
```
3. **Install Required Libraries**:
```bash
pip install -r requirements.txt
```
4. **Configuration**:
- Create a `.env` file and define the necessary environment variables. [Request an API key from NVD](https://nvd.nist.gov/developers/request-an-api-key)
- Visit: [Ollama](https://ollama.com/)
## Usage
### Running the Project
Run the project in different terminals:
```bash
py dailyCVE2cpe.py
```
```bash
streamlit run CVEvisualizaiton.py --serve localhost
```