Skip to content

Commit

Permalink
Add Fuzzit integration
Browse files Browse the repository at this point in the history
Add a basic fuzz test for the httprule package, run regression tests
locally on every PR and continuous fuzzing on fuzzit.dev.
  • Loading branch information
dominikh authored and Yevgeny Pats committed Aug 20, 2019
1 parent fd2d159 commit 7598936
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jobs:
- checkout
- run: go get golang.org/x/lint/golint
- run: make lint
fuzzit:
docker:
- image: fuzzitdev/golang:1.12.7-buster
working_directory: /go/src/github.com/grpc-gateway/grpc-gateway
steps:
- checkout
- setup_remote_docker
- run: ./fuzzit.sh
bazel:
docker:
- image: l.gcr.io/google/bazel:latest
Expand Down Expand Up @@ -88,6 +96,7 @@ workflows:
jobs:
- build
- test
- fuzzit
- node_test
- generate
- lint
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# grpc-gateway

[![release](https://img.shields.io/github/release/grpc-ecosystem/grpc-gateway.svg?style=flat-square)](https://github.com/grpc-ecosystem/grpc-gateway/releases) [![CircleCI](https://img.shields.io/circleci/project/github/grpc-ecosystem/grpc-gateway/master.svg?style=flat-square)](https://circleci.com/gh/grpc-ecosystem/grpc-gateway) [![coverage](https://img.shields.io/codecov/c/github/grpc-ecosystem/grpc-gateway/master.svg?style=flat-square)](https://codecov.io/gh/grpc-ecosystem/grpc-gateway) [![license](https://img.shields.io/github/license/grpc-ecosystem/grpc-gateway.svg?style=flat-square)](LICENSE.txt)
[![release](https://img.shields.io/github/release/grpc-ecosystem/grpc-gateway.svg?style=flat-square)](https://github.com/grpc-ecosystem/grpc-gateway/releases) [![CircleCI](https://img.shields.io/circleci/project/github/grpc-ecosystem/grpc-gateway/master.svg?style=flat-square)](https://circleci.com/gh/grpc-ecosystem/grpc-gateway) [![fuzzit](https://app.fuzzit.dev/badge?org_id=grpc-gateway)](https://app.fuzzit.dev/orgs/grpc-gateway/dashboard) [![coverage](https://img.shields.io/codecov/c/github/grpc-ecosystem/grpc-gateway/master.svg?style=flat-square)](https://codecov.io/gh/grpc-ecosystem/grpc-gateway) [![license](https://img.shields.io/github/license/grpc-ecosystem/grpc-gateway.svg?style=flat-square)](LICENSE.txt)

The grpc-gateway is a plugin of the Google protocol buffers compiler
[protoc](https://github.com/protocolbuffers/protobuf).
Expand Down
11 changes: 11 additions & 0 deletions protoc-gen-grpc-gateway/httprule/fuzz.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// +build gofuzz

package httprule

func Fuzz(data []byte) int {
_, err := Parse(string(data))
if err != nil {
return 0
}
return 0
}

0 comments on commit 7598936

Please sign in to comment.