Skip to content

test: Add fuzz test for ParseWebHook#4076

Merged
gmlewis merged 4 commits intogoogle:masterfrom
YooLCD:feat-fuzz-webhook
Mar 11, 2026
Merged

test: Add fuzz test for ParseWebHook#4076
gmlewis merged 4 commits intogoogle:masterfrom
YooLCD:feat-fuzz-webhook

Conversation

@YooLCD
Copy link
Copy Markdown
Contributor

@YooLCD YooLCD commented Mar 11, 2026

Add a native Go fuzz target for ParseWebHook to improve robustness
and support future OSS-Fuzz integration.

Seeds all known event types via MessageTypes() and EventForType()
to maximize coverage of valid JSON decoding paths.
The fuzzer verifies that no input triggers a panic or nil pointer dereference.

To run:

go test -fuzz=^FuzzParseWebHook$ -fuzztime=30s .

@google-cla
Copy link
Copy Markdown

google-cla bot commented Mar 11, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gmlewis gmlewis changed the title test: Add fuzz test for ParseWebHook test: Add fuzz test for ParseWebHook Mar 11, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.67%. Comparing base (3117b62) to head (9aa8f50).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4076   +/-   ##
=======================================
  Coverage   93.67%   93.67%           
=======================================
  Files         211      211           
  Lines       19478    19478           
=======================================
  Hits        18246    18246           
  Misses       1034     1034           
  Partials      198      198           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @YooLCD!

Quick question: Is the intention to run this fuzz test manually periodically, or were you thinking of integrating this into the CI/CD pipeline?
Also, what do you think about adding the go test ... command line example from the PR description to the comment on lines 14-15 for easy reference?

LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra - @munlicode

@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Mar 11, 2026
@YooLCD
Copy link
Copy Markdown
Contributor Author

YooLCD commented Mar 11, 2026

Thank you for the review, @gmlewis!

  1. The intention is to integrate this into OSS-Fuzz so it runs continuously in the cloud.

  2. Good idea — I'll add the command to the comment.

@gmlewis
Copy link
Copy Markdown
Collaborator

gmlewis commented Mar 11, 2026

Thank you for the review, @gmlewis!

  1. The intention is to integrate this into OSS-Fuzz so it runs continuously in the cloud.
  2. Good idea — I'll add the command to the comment.

OK, great! What do you think about adding the link https://google.github.io/oss-fuzz/ to the comment as well so other people can easily find OSS-Fuzz ?

@YooLCD
Copy link
Copy Markdown
Contributor Author

YooLCD commented Mar 11, 2026

Done! I've added the OSS-Fuzz link and fixed the formatting in the latest commit.

@munlicode
Copy link
Copy Markdown
Contributor

LGTM

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Mar 11, 2026
@gmlewis
Copy link
Copy Markdown
Collaborator

gmlewis commented Mar 11, 2026

Thank you, @munlicode!
Merging.

@gmlewis gmlewis merged commit 7d9980e into google:master Mar 11, 2026
8 checks passed
@YooLCD
Copy link
Copy Markdown
Contributor Author

YooLCD commented Mar 23, 2026

@gmlewis Hi, I'm working on integrating go-github into OSS-Fuzz.
The reviewer is requesting maintainer approval and a maintainer email address
for project.yaml. Could you provide these if possible?

@gmlewis
Copy link
Copy Markdown
Collaborator

gmlewis commented Mar 24, 2026

@gmlewis Hi, I'm working on integrating go-github into OSS-Fuzz. The reviewer is requesting maintainer approval and a maintainer email address for project.yaml. Could you provide these if possible?

I would prefer to be contacted either through a GitHub issue as @gmlewis or contacted via Keybase.io as @gmlewis as can be viewed in my GitHub bio.

@YooLCD
Copy link
Copy Markdown
Contributor Author

YooLCD commented Mar 24, 2026

Sorry for the inappropriate place to contact you. I'll reach out via Keybase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants