diff options
author | Catena cyber <35799796+catenacyber@users.noreply.github.com> | 2021-01-11 18:25:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-11 09:25:05 -0800 |
commit | b5b4b259ec3a638dd3542ea67afd9e8bcbb02471 (patch) | |
tree | 1ee332e32501a6fa4c25d26ca539ca4f900d9ee7 /projects/go-sqlite3 | |
parent | 6817d2ca67cbaa8ab8c10ab831b51cb614d8c2c4 (diff) |
Adds golang project go-sqlite3 (#4946)
Diffstat (limited to 'projects/go-sqlite3')
-rw-r--r-- | projects/go-sqlite3/Dockerfile | 23 | ||||
-rwxr-xr-x | projects/go-sqlite3/build.sh | 26 | ||||
-rw-r--r-- | projects/go-sqlite3/project.yaml | 10 |
3 files changed, 59 insertions, 0 deletions
diff --git a/projects/go-sqlite3/Dockerfile b/projects/go-sqlite3/Dockerfile new file mode 100644 index 00000000..e948b558 --- /dev/null +++ b/projects/go-sqlite3/Dockerfile @@ -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 +# TODO use upstream repo +# RUN go get -t github.com/mattn/go-sqlite3 +RUN git clone --branch fuzz --depth 1 http://github.com/catenacyber/go-sqlite3 $GOPATH/src/github.com/mattn/go-sqlite3 + +COPY build.sh fuzz*.go $SRC/ +WORKDIR $SRC/ diff --git a/projects/go-sqlite3/build.sh b/projects/go-sqlite3/build.sh new file mode 100755 index 00000000..6efdb062 --- /dev/null +++ b/projects/go-sqlite3/build.sh @@ -0,0 +1,26 @@ +#!/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. +# +################################################################################ + +cd $GOPATH/src/github.com/mattn/go-sqlite3 + +compile_go_fuzzer github.com/mattn/go-sqlite3/_example/fuzz FuzzOpenExec fuzz_open_exec + +# generate corpus +go run _example/simple/simple.go +echo -n -e "select id, name from foo\x00" > simple.fuzc +cat foo.db >> simple.fuzc +zip -r $OUT/fuzz_open_exec_seed_corpus.zip simple.fuzc diff --git a/projects/go-sqlite3/project.yaml b/projects/go-sqlite3/project.yaml new file mode 100644 index 00000000..11ef0b10 --- /dev/null +++ b/projects/go-sqlite3/project.yaml @@ -0,0 +1,10 @@ +homepage: "http://mattn.github.io/go-sqlite3/" +primary_contact: "mattn.jp@gmail.com" +auto_ccs: + - "p.antoine@catenacyber.fr" +language: go +fuzzing_engines: + - libfuzzer +sanitizers: + - address +main_repo: 'https://github.com/mattn/go-sqlite3/' |