istio.io/istio@v0.0.0-20240520182934-d79c90f27776/tests/fuzz/README.md (about)

     1  # Istio fuzzing
     2  
     3  Istio has a series of fuzzers that run continuously through OSS-fuzz.
     4  
     5  ## Native fuzzers
     6  
     7  While many jobs are still using the old [go-fuzz](https://github.com/dvyukov/go-fuzz) style fuzzers, using [Go 1.18 native fuzzing](https://go.dev/doc/fuzz/) is preferred.
     8  These should be written alongside standard test packages.
     9  Currently, these cannot be in `<pkg>_test` packages; instead move them to a file under `<pkg>`.
    10  
    11  Fuzz jobs will be run in unit test mode automatically (i.e. run once) and as part of OSS-fuzz.
    12  
    13  ## Local testing
    14  
    15  To run the fuzzers, follow these steps:
    16  
    17  ```bash
    18  git clone --depth=1 https://github.com/google/oss-fuzz.git
    19  cd oss-fuzz
    20  python infra/helper.py build_image istio
    21  python infra/helper.py build_fuzzers istio ~/go/src/istio.io/istio
    22  ```
    23  
    24  Reproduce failure:
    25  
    26  ```bash
    27  python infra/helper.py reproduce istio FuzzX ~/Downloads/clusterfuzz-testcase-minimized-FuzzX-1234
    28  ```
    29  
    30  Run:
    31  
    32  ```bash
    33  python infra/helper.py run_fuzzer istio FuzzValidateMeshConfig
    34  ```