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 "magic" mode for Go projects #26

Closed
kjk opened this issue Aug 11, 2019 · 2 comments
Closed

Add "magic" mode for Go projects #26

kjk opened this issue Aug 11, 2019 · 2 comments

Comments

@kjk
Copy link
Contributor

@kjk kjk commented Aug 11, 2019

Currently adding integration to a Go project requires writing a multi-step shell script.

Wouldn't it be nice if we could just do: fuzzit gomagic --org=kkowalczyk --fuzzing (or fuzzit gomagic --regression) and fuzzit just does the right thing?

(gomagic is just a placeholder name).

For most projects it would be possible to automate everything with heuristics.

It's not a replacement, just an addition (the old way would still work).

Roughly what this would do:

  • for --fuzzing check api key is provided via FUZZIT_API_KEY or --auth option an exit with error message if not
  • auto-detect fuzz targets by parsing code and looking for packages with gofuzz tag
  • auto-detect corpus following some rules (e.g. it must be a "corpus" directory)
  • install go-fuzz and build targets (with auto-naming of targets based on ${package}-${func}
  • build fuzzing targets with clang
  • create targets if not exist on the server
  • upload jobs
  • get git branch and commit from the repo
    etc.

The logic might grow to accommodate more complex scenarios but it could start with just simple scenarios like a single fuzz target.

It should log all the steps so that people understand what it does.

@fuzzitdev fuzzitdev deleted a comment from kjk Aug 12, 2019
@yevgenypats
Copy link
Collaborator

@yevgenypats yevgenypats commented Aug 12, 2019

Some steps here are easy to automate and some steps are much harder (to make them work in the general case). Let's put it here and see what we think after we gain more experience with go projects.

@yevgenypats
Copy link
Collaborator

@yevgenypats yevgenypats commented Aug 19, 2019

moving this to internal trello. as well as some steps here are already done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.