File tree Expand file tree Collapse file tree 7 files changed +103
-0
lines changed
Expand file tree Collapse file tree 7 files changed +103
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM gcr.io/oss-fuzz-base/base-builder-rust
2+ RUN apt-get update && apt-get install -y make autoconf automake libtool
3+ COPY . $SRC/project
4+ WORKDIR $SRC/project
5+ COPY .clusterfuzzlite/build.sh $SRC/
Original file line number Diff line number Diff line change 1+ #! /bin/bash -eu
2+
3+ cd $SRC /project
4+ cargo +nightly fuzz build --release
5+ cp fuzz/target/* /release/fuzz_* $OUT /
Original file line number Diff line number Diff line change 1+ language : rust
2+ sanitizers :
3+ - address
4+ - undefined
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: PMPL-1.0-or-later
2+ name : ClusterFuzzLite Batch
3+ on :
4+ schedule :
5+ - cron : ' 0 0 * * 0'
6+ permissions : read-all
7+ jobs :
8+ BatchFuzzing :
9+ runs-on : ubuntu-latest
10+ strategy :
11+ fail-fast : false
12+ matrix :
13+ sanitizer : [address, undefined]
14+ steps :
15+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
16+ - uses : google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
17+ with :
18+ sanitizer : ${{ matrix.sanitizer }}
19+ language : rust
20+ - uses : google/clusterfuzzlite/actions/run_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
21+ with :
22+ github-token : ${{ secrets.GITHUB_TOKEN }}
23+ fuzz-seconds : 1800
24+ sanitizer : ${{ matrix.sanitizer }}
25+ mode : batch
26+ output-sarif : true
27+ - uses : github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3
28+ if : always()
29+ with :
30+ sarif_file : vulnerabilities.sarif
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: PMPL-1.0-or-later
2+ name : ClusterFuzzLite PR
3+ on :
4+ pull_request :
5+ paths :
6+ - ' **/*.rs'
7+ permissions : read-all
8+ jobs :
9+ PR :
10+ runs-on : ubuntu-latest
11+ strategy :
12+ fail-fast : false
13+ matrix :
14+ sanitizer : [address, undefined]
15+ steps :
16+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
17+ - uses : google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
18+ with :
19+ sanitizer : ${{ matrix.sanitizer }}
20+ language : rust
21+ - uses : google/clusterfuzzlite/actions/run_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
22+ with :
23+ github-token : ${{ secrets.GITHUB_TOKEN }}
24+ fuzz-seconds : 300
25+ sanitizer : ${{ matrix.sanitizer }}
26+ mode : code-change
27+ output-sarif : true
28+ - uses : github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3
29+ if : always()
30+ with :
31+ sarif_file : vulnerabilities.sarif
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " fuzz"
3+ version = " 0.0.0"
4+ publish = false
5+ edition = " 2021"
6+
7+ [package .metadata ]
8+ cargo-fuzz = true
9+
10+ [dependencies ]
11+ libfuzzer-sys = " 0.4"
12+
13+ [dependencies .conative-gating ]
14+ path = " .."
15+
16+ [[bin ]]
17+ name = " fuzz_main"
18+ path = " fuzz_targets/fuzz_main.rs"
19+ test = false
20+ doc = false
Original file line number Diff line number Diff line change 1+ #![ no_main]
2+ use libfuzzer_sys:: fuzz_target;
3+
4+ fuzz_target ! ( |data: & [ u8 ] | {
5+ // TODO: Customize fuzzing logic for this repo
6+ // Example: parse input, test functions, etc.
7+ let _ = std:: str :: from_utf8( data) ;
8+ } ) ;
You can’t perform that action at this time.
0 commit comments