- 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.
-
Clone the repository and cd into it:
git clone https://github.com/kchousos/llm-harness.git; cd llm-harness
-
Install the project:
uv sync
-
Add an OpenAI API key in
.env
, such as:# cat .env OPENAI_API_KEY=<API-key-here>
-
Execute the main script:
uv run python main.py <repo-link>
$ uv run python main.py --help
usage: main.py [-h] [-c COMMIT] [-m MODEL] [-f FILES [FILES ...]] repo
Generate fuzzing harnesses for C/C++ projects
positional arguments:
repo Link of a project's git repo, for which to generate a harness.
options:
-h, --help show this help message and exit
-c COMMIT, --commit COMMIT
A specific commit of the project to check out
-m MODEL, --model MODEL
LLM model to be used. Available: gpt-4.1-mini, o1, o1-pro, gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-mini
-f FILES [FILES ...], --files FILES [FILES ...]
File patterns to include in analysis (e.g. *.c *.h)