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

Integrate with Google’s OSS Fuzz service #510

Open
mhoad opened this issue Mar 11, 2021 · 7 comments · May be fixed by #664
Open

Integrate with Google’s OSS Fuzz service #510

mhoad opened this issue Mar 11, 2021 · 7 comments · May be fixed by #664
Labels
good first issue Good for newcomers help wanted Extra attention is needed kind/enhancement New feature or request P2 size/S triaged/resolved Items triaged and ready

Comments

@mhoad
Copy link

mhoad commented Mar 11, 2021

This was only just released but looks as though it could be a good addition to the SDK test suite.
https://security.googleblog.com/2021/03/fuzzing-java-in-oss-fuzz.html?m=1

@artursouza artursouza added area/test/unit good first issue Good for newcomers kind/enhancement New feature or request P2 size/S triaged/resolved Items triaged and ready labels Mar 11, 2021
@artursouza
Copy link
Member

I am all in for this. I think it would be a great opportunity for the community to contribute.

@mukundansundar mukundansundar added the help wanted Extra attention is needed label Mar 11, 2021
@mhoad
Copy link
Author

mhoad commented Mar 16, 2021

Looking into this a little bit more it seems like there is a whole process involved with this that I wasn't originally aware of that is outlined here https://google.github.io/oss-fuzz/getting-started/accepting-new-projects/

@artursouza
Copy link
Member

@mhoad Thanks for looking into this. One day, we will "have a significant user base and/or be critical to the global IT infrastructure".

@artursouza artursouza added wontfix This will not be worked on and removed area/test/unit labels Mar 16, 2021
@mhoad
Copy link
Author

mhoad commented Mar 18, 2021

@artursouza just one more thing. It seems there might be a viable path still. My understanding here is that the fuzzier itself is open source here https://github.com/CodeIntelligenceTesting/jazzer but the managed ongoing testing is it’s own separate thing. Is it an option still if we handle the infrastructure? Is that even a reasonable goal though?

@artursouza
Copy link
Member

Let me reopen this in the meantime.

Well, is this something we can run on GitHub actions? If you can try that out and it works, we can take a PR in.

@artursouza artursouza reopened this Mar 18, 2021
@artursouza artursouza removed the wontfix This will not be worked on label Mar 18, 2021
@sahansera
Copy link

Hi @artursouza I'm keen to look into this. Could you kindly assign this task to me please? In the meantime, I'm happy to spend some time investigating different strategies in running Jazzer against the Dapr Java SDK code base and write down my thoughts here before raising a PR first. Thank you!

@sahansera
Copy link

I have created a sample repo to test out a path that we could potentially use for this using their autofuzz mode using Docker.

Some observations

  • I selected the DaprClientBuilder class along with its withObjectSerializer & withStateSerializer methods
  • Jazzer requires the fully qualified method reference per each test. Eg: io.dapr.client.DaprClientBuilder::withObjectSerializer
  • The keep_going parameter is set to 1. Otherwise, it will take a long time ( >20mins per test) to complete.
  • Per each run, Jazzer creates a reproducible .java file. In my GitHub action, during each run, I mount the current working directory and publish these files as an artifact of the workflow once it's completed. A sample run can be found here & here.

Some questions

  • Do we want to run this as a separate GitHub action in Dapr SDK's workflows?

    • Pro: We could always run this against the latest build
    • Con: This could potentially increase the build times
  • Do we want to run this as a separate GitHub action?

    • Pro: We could run this periodically without affecting the build times
    • Con: Since this will not be as part of a CI run, the target version will not be the latest.

I'm happy to cut a PR depending on whichever path we choose. Hoping to hear more thoughts on this :)

@sahansera sahansera linked a pull request Dec 7, 2021 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed kind/enhancement New feature or request P2 size/S triaged/resolved Items triaged and ready
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants