Skip to content

Commit

Permalink
tar-rs: Initial integation (#12645)
Browse files Browse the repository at this point in the history
This PR initialises OSS-Fuzz integration for the tar-rs project in Rust.
New fuzzers have been created, and a PR
(alexcrichton/tar-rs#385) has been submitted
upstream to merge the fuzzers.

---------

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
  • Loading branch information
arthurscchan authored Nov 4, 2024
1 parent ddb7f4f commit 9a50925
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
21 changes: 21 additions & 0 deletions projects/tar-rs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2024 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 https://github.com/alexcrichton/tar-rs
WORKDIR $SRC/tar-rs

COPY build.sh $SRC/
23 changes: 23 additions & 0 deletions projects/tar-rs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash -eu
# Copyright 2024 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.
#
################################################################################

# Build the fuzzers and project source code
cargo fuzz build

# Copy built fuzzer binaries to $OUT
find $SRC/tar-rs/fuzz/target/x86_64-unknown-linux-gnu/release -maxdepth 1 \
-type f -perm -u=x -exec cp {} $OUT \;
11 changes: 11 additions & 0 deletions projects/tar-rs/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
homepage: "https://github.com/alexcrichton/tar-rs"
main_repo: "https://github.com/alexcrichton/tar-rs.git"
primary_contact: "cgwalters@gmail.com"
sanitizers:
- address
fuzzing_engines:
- libfuzzer
language: rust
auto_ccs:
- "arthur.chan@adalogics.com"
- "david@adalogics.com"

0 comments on commit 9a50925

Please sign in to comment.