Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fuzzing: refactor OSS-Fuzz build script #1377

Merged
merged 1 commit into from
Mar 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 6 additions & 23 deletions tests/oss_fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

apt-get update && apt-get install -y wget
cd $SRC
wget https://go.dev/dl/go1.19.5.linux-amd64.tar.gz

mkdir temp-go
rm -rf /root/.go/*
tar -C temp-go/ -xzf go1.19.5.linux-amd64.tar.gz
mv temp-go/go/* /root/.go/


cd $SRC
git clone --depth=1 https://github.com/AdamKorcz/instrumentation
cd instrumentation
go run main.go $SRC/rekor
cd $SRC/instrumentation
go mod tidy
go run main.go --target_dir=$SRC/rekor --check_io_length=true
go run main.go --target_dir=$SRC/relic --check_io_length=false

cd $SRC/rekor
go mod tidy
Expand Down Expand Up @@ -61,16 +51,9 @@ compile_native_go_fuzzer github.com/sigstore/rekor/pkg/types/helm/v0.0.1 FuzzHel
compile_native_go_fuzzer github.com/sigstore/rekor/pkg/types/rekord/v0.0.1 FuzzRekordCreateProposedEntry FuzzRekordCreateProposedEntry

# Test 3rd party API that rekor/pkg/types/jar/v0.0.1 uses
cd $SRC
git clone https://github.com/sassoftware/relic
cd $SRC/relic
git checkout dfb082b79b74bf792c0bfd7aca6e22bea6156a85
cd $SRC/instrumentation
go run main.go $SRC/relic
cd $SRC/relic
go mod tidy
cd $SRC/rekor
go mod edit -replace github.com/sassoftware/relic=$SRC/relic
go mod tidy
go get github.com/AdamKorcz/go-118-fuzz-build/testing
compile_native_go_fuzzer github.com/sigstore/rekor/pkg/types/jar/v0.0.1 FuzzJarutilsVerify FuzzJarutilsVerify


Expand Down