Skip to content
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

Add ClusterfuzzLite #709

Closed
wants to merge 1 commit into from
Closed

Add ClusterfuzzLite #709

wants to merge 1 commit into from

Conversation

AdamKorcz
Copy link

This PR adds ClusterfuzzLite to the CI.

CFLite will run the fuzzer in this PR - as well as other fuzzers that get added - in the CI when a new PR is made.

Signed-off-by: AdamKorcz <[email protected]>
@AdamKorcz AdamKorcz requested a review from a team July 25, 2022 16:19
@github-actions github-actions bot added area/schema Affects the Schema Language area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels Jul 25, 2022
@github-actions
Copy link

github-actions bot commented Jul 25, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@AdamKorcz
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@jzelinskie
Copy link
Member

Hello there!

Fuzzing is definitely something we'd like to add to our test suites.

Google's ClusterfuzzLite looks pretty useful -- I like how containerd is leveraging it in their workflows as it doesn't introduce any new files into their repository.

What is the advantage to using the AdaLogistics library over the built-in functionality in Go 1.18?

@AdamKorcz
Copy link
Author

What is the advantage to using the AdaLogistics library over the built-in functionality in Go 1.18?

The go-fuzz-headers library offers a number of useful features for fuzzing, but these do not conflict with the Go 1.18 fuzzing engine. If you would prefer to have a Go 1.18 fuzzer, I can rewrite it.

@jzelinskie
Copy link
Member

I think using the Go 1.18 fuzzing is best until we can justify adding the dependency.

I also took a look at Prometheus's usage of ClusterFuzz and it looks really good.

@jzelinskie
Copy link
Member

@AdamKorcz any updates here?

@AdamKorcz
Copy link
Author

@AdamKorcz any updates here?

Sorry for the delay. I will look into changing the fuzzers to the 1.18 engine when I get a moment. Thanks for the ping!

@vroldanbet
Copy link
Contributor

vroldanbet commented Sep 21, 2022

hey @AdamKorcz, thanks again for your contribution! we thought it would be good to get this over the finish line so I started investigating how it works in #830.

We thought it would be a good idea to submit our project to oss-fuzz. The latter supports go native fuzzing via a script you wrote 😄 I have the project submission almost ready.

ClusterFuzzLite docs indicate it is based on OSS-fuzz framework, but only supports libFuzzer. Is this outdated documentation? can we also do compile_native_go_fuzzer in ClusterFuzzLite?

EDIT: I found google/clusterfuzzlite#102, I think I can work with your submission and adjust it to use the native fuzzer I wrote in #830

@AdamKorcz
Copy link
Author

OSS-Fuzz integration would be great.

can we also do compile_native_go_fuzzer in ClusterFuzzLite?

I assume you mean in OSS-Fuzz? The answer is yes.

@vroldanbet
Copy link
Contributor

@AdamKorcz I actually meant OssFuzzLite. The reason I ask is that I have doubts oss-fuzz will accept our submission in a promptly manner. There are 210 open PRs in the repository, so running ClusterFuzzLite ourselves in our CI pipeline would allow us to iterate faster. Thoughts?

@AdamKorcz
Copy link
Author

@AdamKorcz I actually meant OssFuzzLite. The reason I ask is that I have doubts oss-fuzz will accept our submission in a promptly manner. There are 210 open PRs in the repository, so running ClusterFuzzLite ourselves in our CI pipeline would allow us to iterate faster. Thoughts?

What is OssFuzzLite?

The reason I ask is that I have doubts oss-fuzz will accept our submission in a promptly manner. There are 210 open PRs in the repository, so running ClusterFuzzLite ourselves in our CI pipeline would allow us to iterate faster. Thoughts?

The OSS-Fuzz project should review the submission fairly fast. Your PR will not be 211 in line. However, do note that OSS-Fuzz will only accept the integration in case SpiceDB can disclosure a critical user base (companies, other open source projects etc)

@vroldanbet
Copy link
Contributor

OssFuzzLite

whoops meant ClusterFuzzLite

The OSS-Fuzz project should review the submission fairly fast. Your PR will not be 211 in line. However, do note that OSS-Fuzz will only accept the integration in case SpiceDB can disclosure a critical user base (companies, other open source projects etc)

Understood! I think we can get started with ClusterFuzzLite using native go fuzzing, and once we have the submission ready we can move to oss-fuzz if we get accepted

Thanks a ton!

@AdamKorcz
Copy link
Author

compile_native_go_fuzzer

whoops meant ClusterFuzzLite, ah I see. Yes, compile_native_go_fuzzer works in CFL too. It depends heavily on https://github.com/AdamKorcz/go-118-fuzz-build, so if you experience any issues, feel free to open a ticket there.

@vroldanbet
Copy link
Contributor

@AdamKorcz My PR #830 seems to be finally running CFL (added you as co-author 😄 ), although it's running out of memory. Any advice on how to tune it to work with the resources available in Actions runners?

Feel free to close this one!

@josephschorr
Copy link
Member

@AdamKorcz ping on this

@josephschorr
Copy link
Member

Closing; feel free to reopen if necessary

@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/schema Affects the Schema Language area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants