| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ This directory contains files related to GitPython's suite of fuzz tests that ar | |||
| 6 | 6 | infrastructure provided by [OSS-Fuzz][oss-fuzz-repo]. This document aims to provide necessary information for working | |
| 7 | 7 | with fuzzing in GitPython. | |
| 8 | 8 | ||
| 9 | - The details about the latest OSS-Fuzz test status, including build logs and coverage reports, is made available | ||
| 9 | + The latest details regarding OSS-Fuzz test status, including build logs and coverage reports, is made available | ||
| 10 | 10 | at [this link](https://introspector.oss-fuzz.com/project-profile?project=gitpython). | |
| 11 | 11 | ||
| 12 | 12 | ## How to Contribute | |
@@ -23,7 +23,7 @@ Areas that are particularly appreciated include: | |||
| 23 | 23 | update of any size, please consider suggesting it! | |
| 24 | 24 | ||
| 25 | 25 | For everything else, such as expanding test coverage, optimizing test performance, or enhancing error detection | |
| 26 | - capabilities, jump in to the "Getting Started" section below. | ||
| 26 | + capabilities, jump into the "Getting Started" section below. | ||
| 27 | 27 | ||
| 28 | 28 | ## Getting Started with Fuzzing GitPython | |
| 29 | 29 | ||
@@ -63,7 +63,7 @@ The `fuzzing/` directory is organized into three key areas: | |||
| 63 | 63 | ||
| 64 | 64 | ### Fuzz Targets (`fuzz-targets/`) | |
| 65 | 65 | ||
| 66 | - Contains Python files for each fuzz test, targeting specific functionalities of GitPython. | ||
| 66 | + Contains Python files for each fuzz test. | ||
| 67 | 67 | ||
| 68 | 68 | **Things to Know**: | |
| 69 | 69 | ||
@@ -81,7 +81,7 @@ Contains Python files for each fuzz test, targeting specific functionalities of | |||
| 81 | 81 | ||
| 82 | 82 | Provides hints to the fuzzing engine about inputs that might trigger unique code paths. Each fuzz target may have a | |
| 83 | 83 | corresponding `.dict` file. For details on how these are used, refer | |
| 84 | - to [LibFuzzer documentation](https://llvm.org/docs/LibFuzzer.html#dictionaries). | ||
| 84 | + to the [LibFuzzer documentation on the subject](https://llvm.org/docs/LibFuzzer.html#dictionaries). | ||
| 85 | 85 | ||
| 86 | 86 | **Things to Know**: | |
| 87 | 87 | ||
@@ -105,6 +105,11 @@ Includes scripts for building and integrating fuzz targets with OSS-Fuzz: | |||
| 105 | 105 | - **`build.sh`** - Executed within the Docker container, this script builds fuzz targets with necessary instrumentation | |
| 106 | 106 | and prepares seed corpora and dictionaries for use. | |
| 107 | 107 | ||
| 108 | + **Where to learn more:** | ||
| 109 | + | ||
| 110 | + - [OSS-Fuzz documentation on the build.sh](https://google.github.io/oss-fuzz/getting-started/new-project-guide/#buildsh) | ||
| 111 | + - [See GitPython's build.sh and Dockerfile in the OSS-Fuzz repository](https://github.com/google/oss-fuzz/tree/master/projects/gitpython) | ||
| 112 | + | ||
| 108 | 113 | ## Running Fuzzers Locally | |
| 109 | 114 | ||
| 110 | 115 | ### Direct Execution of Fuzz Targets | |
@@ -153,9 +158,21 @@ python infra/helper.py check_build gitpython | |||
| 153 | 158 | Execute the desired fuzz target: | |
| 154 | 159 | ||
| 155 | 160 | ```shell | |
| 156 | - python infra/helper.py run_fuzzer gitpython $FUZZ_TARGET | ||
| 161 | + python infra/helper.py run_fuzzer gitpython $FUZZ_TARGET -- -max_total_time=60 -print_final_stats=1 | ||
| 157 | 162 | ``` | |
| 158 | 163 | ||
| 164 | + > [!TIP] | ||
| 165 | + > In the example above, the "`-- -max_total_time=60 -print_final_stats=1`" portion of the command is optional but quite | ||
| 166 | + > useful. | ||
| 167 | + > | ||
| 168 | + > Every argument provided after "`--`" in the above command is passed to the fuzzing engine directly. In this case: | ||
| 169 | + > - `-max_total_time=60` tells the LibFuzzer to stop execution after 60 seconds have elapsed. | ||
| 170 | + > - `-print_final_stats=1` tells the LibFuzzer to print a summary of useful metrics about the target run upon | ||
| 171 | + completion. | ||
| 172 | + > | ||
| 173 | + > But almost any [LibFuzzer option listed in the documentation](https://llvm.org/docs/LibFuzzer.html#options) should | ||
| 174 | + > work as well. | ||
| 175 | + | ||
| 159 | 176 | #### Next Steps | |
| 160 | 177 | ||
| 161 | 178 | For detailed instructions on advanced features like reproducing OSS-Fuzz issues or using the Fuzz Introspector, refer | |
| Back | FazBrowse Home | New Git URL |
0 commit comments