Forseti Config Validator: initial integration (#6695)

* Add project config-validator

* Build in the policy library files

* Fix corpus zip file name

* Switch to the official repo, no my fork

* Add morgante@ as a cc

* Use Morgante's work email
This commit is contained in:
Martin Petkov 2021-11-18 11:31:18 -05:00 committed by GitHub
parent 8598780e62
commit 38f3b3928f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,25 @@
# 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-go
# Clone the actual repo with the fuzz target.
RUN git clone --depth 1 https://github.com/GoogleCloudPlatform/config-validator $GOPATH/src/github.com/GoogleCloudPlatform/config-validator
COPY build.sh $SRC/
# Required to avoid 'working directory is not part of a module' error.
WORKDIR $GOPATH/src/github.com/GoogleCloudPlatform/config-validator

View File

@ -0,0 +1,28 @@
#!/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.
#
################################################################################
# Copy the library files needed to initialize the validator.
mkdir -p $OUT/validatorfiles
cp -a 'test/cf/constraints' $OUT/validatorfiles
cp -a 'test/cf/library' $OUT/validatorfiles
cp -a 'test/cf/templates' $OUT/validatorfiles
# Copy the corpus.
zip -jr $OUT/fuzz_config_validator_seed_corpus.zip internal/fuzz/corpus
# Compile the fuzzer.
compile_go_fuzzer github.com/GoogleCloudPlatform/config-validator/internal/fuzz Fuzz fuzz_config_validator

View File

@ -0,0 +1,10 @@
homepage: "https://github.com/GoogleCloudPlatform/config-validator/"
main_repo: "https://github.com/GoogleCloudPlatform/config-validator/"
primary_contact: "martin.p.petkov@gmail.com"
auto_ccs:
- morgantep@google.com
language: go
fuzzing_engines:
- libfuzzer
sanitizers:
- address