https://github.com/kchousos/llm-harness
Automatic LLM-generated fuzzing harnesses for your C/C++ project.
https://github.com/kchousos/llm-harness
c-projects cpp-projects fuzzing harness llm neurosymbolic-ai
Last synced: about 1 year ago
JSON representation
Automatic LLM-generated fuzzing harnesses for your C/C++ project.
- Host: GitHub
- URL: https://github.com/kchousos/llm-harness
- Owner: kchousos
- License: gpl-3.0
- Created: 2025-04-17T17:04:03.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-05-08T11:55:55.000Z (about 1 year ago)
- Last Synced: 2025-05-08T12:41:15.911Z (about 1 year ago)
- Topics: c-projects, cpp-projects, fuzzing, harness, llm, neurosymbolic-ai
- Language: Python
- Homepage: https://kchousos.github.io/llm-harness/
- Size: 721 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
LLM-Harness (TBD)
- Collects information of your project structure and files.
- Gives relevant context to LLM.
- Automatically writes generated harness.
- Builds any generated harness and evaluates it.
- Supports OpenAI's models.
# Getting Started
## Installation
### Dependencies
- Python >=3.10
- [uv](https://docs.astral.sh/uv/)
```bash
pipx install uv
```
### Installation Steps
1. Clone the repository:
```bash
git clone https://github.com/kchousos/llm-harness.git
```
2. Install the project:
```bash
uv sync
```
## Usage
1. Add an OpenAI API key in `.env`, such as:
```bash
# cat .env
OPENAI_API_KEY=
```
2. Execute the main script:
```bash
uv run python main.py
```
### Command-Line Options
```
$ python main.py --help
usage: main.py [-h] [-m MODEL] [-f FILES [FILES ...]] project
Generate fuzzing harnesses for C/C++ projects
positional arguments:
project Name of the project under the `assets/` directory, for which harnesses are to be generated.
options:
-h, --help show this help message and exit
-m MODEL, --model MODEL
LLM model to be used. Available: gpt-4.1-mini, o4-mini, o3-mini, gpt-4o, gpt-4o-mini
-f FILES [FILES ...], --files FILES [FILES ...]
File patterns to include in analysis (e.g. *.c *.h)
```