From 28b35e36fea5284c45f56d92e06153cc5b502945 Mon Sep 17 00:00:00 2001 From: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> Date: Fri, 19 Feb 2021 11:54:15 -0800 Subject: [CIFuzz] Support languages non-C++ projects (e.g. Python projects) (#5222) Allow use of non-C++ projects by specifying the language in the workflow file. Fixes #5195 --- docs/getting-started/continuous_integration.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/getting-started/continuous_integration.md b/docs/getting-started/continuous_integration.md index 5ef0cb9d..fac10fe5 100644 --- a/docs/getting-started/continuous_integration.md +++ b/docs/getting-started/continuous_integration.md @@ -39,7 +39,6 @@ fuzzing more effective and gives you regression testing for free. 1. Your project must be integrated with OSS-Fuzz. 1. Your project is hosted on GitHub. -1. Your project is written in C or C++. ## Integrating into your repository @@ -75,13 +74,13 @@ jobs: uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master with: oss-fuzz-project-name: 'example' - dry-run: false + language: c++ - name: Run Fuzzers uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master with: oss-fuzz-project-name: 'example' + language: c++ fuzz-seconds: 600 - dry-run: false - name: Upload Crash uses: actions/upload-artifact@v1 if: failure() && steps.build.outcome == 'success' @@ -94,8 +93,16 @@ jobs: ### Optional configuration #### Configurable Variables + +`language`: (optional) The language your target program is written in. Defaults +to `c++`. This shold be the same as the value you set in `project.yaml`. See +[this explanation]({{ site.baseurl }}//getting-started/new-project-guide/#language) +for more details. + `fuzz-time`: Determines how long CIFuzz spends fuzzing your project in seconds. -The default is 600 seconds. The GitHub Actions max run time is 21600 seconds (6 hours). +The default is 600 seconds. The GitHub Actions max run time is 21600 seconds (6 +hours). This variable is only meaningful when supplied to the `run_fuzzers` +action, not the `build_fuzzers` action. `dry-run`: Determines if CIFuzz surfaces errors. The default value is `false`. When set to `true`, CIFuzz will never report a failure even if it finds a crash in your project. @@ -104,7 +111,8 @@ make sure to set the dry-run parameters in both the `Build Fuzzers` and `Run Fuz `allowed-broken-targets-percentage`: Can be set if you want to set a stricter limit for broken fuzz targets than OSS-Fuzz's check_build. Most users should -not set this. +not set this. This value is only meaningful when supplied to the `run_fuzzers` +action, not the `build_fuzzers` action. `sanitizer`: Determines a sanitizer to build and run fuzz targets with. The choices are `'address'`, `'memory'` and `'undefined'`. The default is `'address'`. It is important to note that the `Build Fuzzers` @@ -129,14 +137,14 @@ jobs: uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master with: oss-fuzz-project-name: 'example' - dry-run: false + language: c++ sanitizer: ${{ matrix.sanitizer }} - name: Run Fuzzers (${{ matrix.sanitizer }}) uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master with: oss-fuzz-project-name: 'example' + language: c++ fuzz-seconds: 600 - dry-run: false sanitizer: ${{ matrix.sanitizer }} - name: Upload Crash uses: actions/upload-artifact@v1 @@ -176,13 +184,13 @@ jobs: uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master with: oss-fuzz-project-name: 'example' - dry-run: false + language: c++ - name: Run Fuzzers uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master with: oss-fuzz-project-name: 'example' + language: c++ fuzz-seconds: 600 - dry-run: false - name: Upload Crash uses: actions/upload-artifact@v1 if: failure() && steps.build.outcome == 'success' -- cgit v1.2.3