Python harness for the crossfuzz differential fuzzer
Project description
crossfuzz
Python harness for crossfuzz, a coverage-guided differential fuzzer across C, C++, Go, Java, JavaScript/TypeScript, Python, and Rust. The coordinator sends the same generated input to multiple implementations of the same function, collects coverage from every target, and flags any divergence in outputs.
This package is the Python side: it handles the shared-memory IPC, pipe protocol, and branch-arc coverage collection so you only have to write the target function.
Install
pip install crossfuzz
You also need the crossfuzz coordinator binary — see the
main repo for build/install instructions.
Quick start
Write a target script that calls crossfuzz.fuzz(your_function):
import crossfuzz
def my_target(data: bytes) -> bytes:
# Your code under test. Raise an exception to signal an error.
return data
crossfuzz.fuzz(my_target)
Point the coordinator at it from a crossfuzz.toml config:
[[target]]
name = "python_impl"
language = "python"
binary = "python3"
args = ["my_target.py"]
Then run the campaign with crossfuzz run crossfuzz.toml.
API
crossfuzz.fuzz(target, settings=None)— persistent fuzz loop.target(data: bytes) -> bytes.crossfuzz.filter(target, settings=None)— persistent filter loop.target(data: bytes) -> tuple[bytes, bool].crossfuzz.compare(target, settings=None)— custom comparator loop.target(input: bytes, names: list[str], outputs: list[bytes]) -> str.crossfuzz.Settings(instrument=True, warmup=0, transform=False)— configuration. Setinstrument=Falsefor thin HTTP-trigger harnesses where coverage comes from an instrumented server process.
Platform
POSIX only — the harness uses mmap and inherited file descriptors 3/4 to
talk to the coordinator. Windows is not supported.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crossfuzz-0.0.3.tar.gz.
File metadata
- Download URL: crossfuzz-0.0.3.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04432dc10c7812c8c46b8b413146a6c9e13027b3bec5ee65fef6ae0c2b887d5f
|
|
| MD5 |
7437299f8b3d996ec11ba055f2fb7a53
|
|
| BLAKE2b-256 |
4bd71133d9c97bcd771d232a08a04b18d241c992bb9375ac504a3a559b1bbe91
|
Provenance
The following attestation bundles were made for crossfuzz-0.0.3.tar.gz:
Publisher:
python-publish.yml on KilledKenny/crossfuzz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crossfuzz-0.0.3.tar.gz -
Subject digest:
04432dc10c7812c8c46b8b413146a6c9e13027b3bec5ee65fef6ae0c2b887d5f - Sigstore transparency entry: 1635311157
- Sigstore integration time:
-
Permalink:
KilledKenny/crossfuzz@c84d2e4a5c4c24c99603bd75c219d2a27731065a -
Branch / Tag:
refs/tags/python-v0.0.3 - Owner: https://github.com/KilledKenny
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c84d2e4a5c4c24c99603bd75c219d2a27731065a -
Trigger Event:
push
-
Statement type:
File details
Details for the file crossfuzz-0.0.3-py3-none-any.whl.
File metadata
- Download URL: crossfuzz-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67cfdc50951ea622d3577c665ce30358bbb9f17448cc06308da8258fdf4fccd7
|
|
| MD5 |
8084c7dd91b5a33db5683e20c44efa22
|
|
| BLAKE2b-256 |
527cd5fad0173e4bf1fdf9bf92d7724b0b1eaf7cdb94a315b3d8f9c85670e975
|
Provenance
The following attestation bundles were made for crossfuzz-0.0.3-py3-none-any.whl:
Publisher:
python-publish.yml on KilledKenny/crossfuzz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crossfuzz-0.0.3-py3-none-any.whl -
Subject digest:
67cfdc50951ea622d3577c665ce30358bbb9f17448cc06308da8258fdf4fccd7 - Sigstore transparency entry: 1635311164
- Sigstore integration time:
-
Permalink:
KilledKenny/crossfuzz@c84d2e4a5c4c24c99603bd75c219d2a27731065a -
Branch / Tag:
refs/tags/python-v0.0.3 - Owner: https://github.com/KilledKenny
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c84d2e4a5c4c24c99603bd75c219d2a27731065a -
Trigger Event:
push
-
Statement type: