Skip to content

Commit

Permalink
[go-dhcp] initial integration
Browse files Browse the repository at this point in the history
Signed-off-by: Arjun Singh <[email protected]>
  • Loading branch information
0x34d committed Jul 20, 2023
1 parent 3184e07 commit 37b8a1f
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
21 changes: 21 additions & 0 deletions projects/go-dhcp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2023 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
RUN git clone --depth 1 https://github.com/insomniacslk/dhcp.git
RUN go install github.com/AdamKorcz/go-118-fuzz-build@latest
COPY build.sh $SRC/
WORKDIR $SRC/dhcp
25 changes: 25 additions & 0 deletions projects/go-dhcp/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash -eu
# Copyright 2023 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.
#
################################################################################

go get github.com/AdamKorcz/go-118-fuzz-build/testing

go get github.com/stretchr/testify/[email protected]
sed -i '58s/^/\/\//g' dhcpv6/dhcpv6_test.go

compile_native_go_fuzzer github.com/insomniacslk/dhcp/dhcpv4 FuzzDHCPv4 fuzz_DHCPv4
compile_native_go_fuzzer github.com/insomniacslk/dhcp/dhcpv6 FuzzDHCPv6 fuzz_DHCPv6
compile_native_go_fuzzer github.com/insomniacslk/dhcp/rfc1035label FuzzLabel fuzz_Label
10 changes: 10 additions & 0 deletions projects/go-dhcp/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
homepage: "https://github.com/insomniacslk/dhcp"
language: go
primary_contact: "[email protected]"
auto_ccs:
- "[email protected]"
fuzzing_engines:
- libfuzzer
sanitizers:
- address
main_repo: "https://github.com/insomniacslk/dhcp.git"

0 comments on commit 37b8a1f

Please sign in to comment.