This repository is the implementation of our paper "Robust and Effective Python Library Fuzzing With Large Language Model" which is submitted to IEEE TDSC for review.
# install RepFuzz with its dependencies
pip install -e .
# (optional) install RepFuzz with its dependencies
pip install -e .[dev]
# (optional) install the puts for experments
bash put_requirements.sh
# if you are using uv, run
# USE_UV=1 bash put_requirements.sh
mkdir -p safedir
cd safedirWe recommend you to run all the following steps in safedir dir since AI will generate arbitrary code.
-
add the target library name you want to fuzz in
tgts, don't forget to install the library first. -
fill the
base_url,model_nameandapi_key, openai-api style LLM service is supported. -
edit the
LIBRARY_DATA_DIRto the directory where you want to store the library data.
A easy way to deploy a LLM quickly is to use ollama and run
ollama run <model_name>, and thebase_urlandapi_keywould behttp://localhost:11434/api/v1andollamaby default.
parse_apigen_api_callfuzz_library -l <target library name>
# example
fuzz_library -l numpy
# fuzz all libraries once(at project root dir)
python src/repfuzz/fuzz/fuzz_library.py