-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Build a self-contained Docker image for fuzzing OSS-Fuzz projects with FuzzBench fuzzing engines. #13185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine libafl |
/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine eclipser |
/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine libafl |
infra/build/functions/fuzzbench.py
Outdated
def get_env_dict(env): | ||
"""Converts a list of environment strings to a dictionary.""" | ||
env_dict = {} | ||
for item in env: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env_dict = {k: v for k,v in item.split('=')}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid doing this? This isn't great, is it possible to get this while it is still in dict format before it is converted to a string with '='
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that the build_project.get_env()
function, which is used in multiple files, returns a list of strings (likely because GCB requires env be a list of strings). Given that, I can either retrieve the needed env variables from the list of strings or transform the list to a dictionary to make it easier. Added a commit with the second option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a list of lists right? I think dict(l) should work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a list of strings in the format: ['key0=value0', 'key1=value1', ...]. Therefore, I couldn't directly use dict(l).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor nits.
/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine libafl |
/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine libafl |
Add build steps to create and upload a self-contained Docker image that enables fuzzing OSS-Fuzz projects using FuzzBench fuzzers. This image encapsulates all necessary runtime dependencies.
/workspace
directory, ensuring they are accessible across build steps.runner.Dockerfile
from FuzzBench, incorporating required fuzzer runtime dependencies into the image.docker run
on this image will initiate fuzzing. Createdood.Dockerfile
for building this image.Note that the high quantity of commits is due to the fact that, during the GCB build,
ood.Dockerfile
is obtained by cloning the repository. Therefore, commits are necessary to apply code changes that affect the build process.Related to b/401215144 .