Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions projects/rust-url/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder-rust

RUN git clone --depth 1 https://github.com/servo/rust-url rust-url
WORKDIR $SRC

COPY build.sh $SRC/
44 changes: 44 additions & 0 deletions projects/rust-url/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash -eu
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

cd $SRC/rust-url

# Build all workspace-level fuzz targets
cd fuzz
cargo fuzz build -O

# Copy all fuzz targets to $OUT
for target in fuzz_url_parse_roundtrip fuzz_url_differential fuzz_url_setters fuzz_idna fuzz_data_url fuzz_form_urlencoded fuzz_percent_encoding; do
cp target/x86_64-unknown-linux-gnu/release/$target $OUT/
done

# Copy seed corpus
if [ -d corpus/seed ]; then
for target in fuzz_url_parse_roundtrip fuzz_url_differential fuzz_url_setters fuzz_idna fuzz_data_url fuzz_form_urlencoded fuzz_percent_encoding; do
mkdir -p $OUT/${target}_seed_corpus
cp corpus/seed/* $OUT/${target}_seed_corpus/
cd $OUT && zip -j ${target}_seed_corpus.zip ${target}_seed_corpus/* && rm -rf ${target}_seed_corpus
cd $SRC/rust-url/fuzz
done
fi

# Copy dictionary
if [ -f fuzz.dict ]; then
for target in fuzz_url_parse_roundtrip fuzz_url_differential fuzz_url_setters fuzz_idna fuzz_data_url fuzz_form_urlencoded fuzz_percent_encoding; do
cp fuzz.dict $OUT/${target}.dict
done
fi
11 changes: 11 additions & 0 deletions projects/rust-url/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
homepage: "https://github.com/servo/rust-url"
language: rust
primary_contact: "manishsmail@gmail.com"
auto_ccs:
- "jaredreyespt@gmail.com"
vendor_ccs:
- "jaredreyespt@gmail.com"
sanitizers:
- address
- undefined
main_repo: "https://github.com/servo/rust-url"