mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
143a59c236
Before this commit, the fuzzer dependend on clusterfuzz, which uses protobuf 3.20. Since fuzzer-bot depended on common subpackage as well and also common (and the other packages) require protobuf, we had to use protobuf 3.20 everywhere. This old dependency however means that a lot of packages can't be used in their "newer" versions, because they depend on newer protobuf versions. This commit splits the fuzzer into a separate fuzzer-runner that is executed in a separate process inside a separate venv. fuzzer-runner executes the clusterfuzz-heavy operations (e.g. fuzzing) and isolates the clusterfuzz dependency, so that the rest of the system can use newer protobuf version. * split `fuzzer-bot` in `fuzzer-runner` and `fuzzer-bot` * have a "full" optional dependency group in `common`, including `openlit` and `protobuf`, so that `fuzzer-runner` can use the lite version of `common` without bringing those heavy deps * move `FuzzConfiguration`/`BuildConfiguration` in a separate common file that doesn't require to load all protobuf files. Again, in this way other components can just depend on the `common` "lite" version and not require protobuf stuff * add `fuzzer-runner` as a separate venv inside the `fuzzer-bot` container * add `RunnerProxy` class in fuzzer package to provide an interface to interact with the fuzzer-runner binary.
13 lines
284 B
Bash
Executable File
13 lines
284 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SCRIPT_DIR=$(dirname "$0")
|
|
|
|
if [ -d "$SCRIPT_DIR/.venv" ]; then
|
|
. "$SCRIPT_DIR/.venv/bin/activate"
|
|
else
|
|
echo "Virtual environment not found in $SCRIPT_DIR/.venv"
|
|
exit 1
|
|
fi
|
|
|
|
buttercup-fuzzer-runner $@ # we use $@ to pass all the arguments to the python script
|