[lotus] Initial integration (#4957)

* [teleport] Initial integration

* Minor update to run tests again

* [lotus] Initial integration

* Updated lotus files

* Experimental fix

* Removed cbor fuzzer from build script

* Changed copyright header

* Fixed nits
This commit is contained in:
AdamKorcz 2021-01-31 19:30:02 +00:00 committed by GitHub
parent 93eb6024f4
commit 03fad2084e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 0 deletions

23
projects/lotus/Dockerfile Normal file
View File

@ -0,0 +1,23 @@
# Copyright 2021 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
RUN apt-get update && apt-get install -y mesa-opencl-icd ocl-icd-opencl-dev gcc \
git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev
RUN git clone --depth 1 https://github.com/filecoin-project/lotus $GOPATH/src/github.com/filecoin-project/lotus
RUN git clone --depth 1 https://github.com/filecoin-project/fuzzing-lotus $GOPATH/src/github.com/filecoin-project/fuzzing-lotus
COPY build.sh $SRC/
WORKDIR $GOPATH/src/github.com/filecoin-project/lotus

24
projects/lotus/build.sh Normal file
View File

@ -0,0 +1,24 @@
#/bin/bash -eu
# Copyright 2021 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.
#
################################################################################
make
compile_go_fuzzer github.com/filecoin-project/lotus/chain/types FuzzMessage fuzz_message gofuzz
compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzBlockMsg fuzz_block_msg
compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzBlockMsgStructural fuzz_block_msg_structural
compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzBlockHeader fuzz_block_header
compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzNodesForHeight fuzz_nodes_for_height

View File

@ -0,0 +1,11 @@
homepage: "https://github.com/filecoin-project/lotus"
main_repo: "https://github.com/filecoin-project/lotus"
primary_contact: "security@filecoin.org"
auto_ccs :
- "Adam@adalogics.com"
- "kubuxu@protocol.ai"
language: go
fuzzing_engines:
- libfuzzer
sanitizers:
- address