flux2 icon indicating copy to clipboard operation
flux2 copied to clipboard

Refactor fuzzing implementations to support go native feature

Open pjbgf opened this issue 2 years ago • 2 comments

Flux has recently implemented an initial coverage of fuzzing across its repositories (xref https://github.com/fluxcd/flux2/issues/2002). At the time of implementation golang did not offer native fuzz testing support, which is yet to be released in golang 1.18.

The proposed refactoring would:

  • Build fuzzers using compile_native_go_fuzzer instead of compile_go_fuzzer.
  • Review need to depend on github.com/AdaLogics/go-fuzz-headers.
  • Better integrate with existing tests and reuse private funcs used within controller testing.
  • Reuse testenv instances across multiple executions to decrease test setup time.

Repositories to be refactored:

  • [x] source-controller
  • [x] kustomize-controller
  • [x] helm-controller
  • [x] notification-controller
  • [x] pkg
  • [x] image-reflector-controller
  • [ ] image-automation-controller

Dependencies for this work:

  • [x] oss-fuzz to support golang native fuzzing
  • [x] golang 1.18 to be officially released
  • [x] Target repository to be upgraded to golang 1.18

pjbgf avatar Feb 10 '22 12:02 pjbgf

@pjbgf Go 1.18 has officially landed.

ilanpillemer avatar Mar 28 '22 07:03 ilanpillemer

@ilanpillemer thanks for the nudge, issue updated accordingly.

We probably will need some upstream dependencies to move on to Go 1.18 before we can do the same - last time around the key dependency was Kubernetes-related if my memory serves me well.

pjbgf avatar Mar 28 '22 09:03 pjbgf

Source controller is the only outstanding controller, which will be dealt with after https://github.com/fluxcd/source-controller/pull/879 is merged.

pjbgf avatar Sep 28 '22 12:09 pjbgf

Now that https://github.com/fluxcd/source-controller/pull/944 has been merged, this is no longer blocked and the SC work is now set to "up-next".

pjbgf avatar Nov 02 '22 13:11 pjbgf