Repository navigation
Fuzz tool: opt-in Go native fuzzing in review_checks.sh - #2422
Merged
Merged
Conversation
…IEW_FUZZ=1) The hub had no fuzzing. review_checks.sh now runs each Go native fuzz target (func FuzzXxx(*testing.F)) only on explicit opt-in (--fuzz or REVIEW_FUZZ=1). It is never implied by --full or --full-history, because it executes repo test code (the org driver runs --full-history on third-party clones and never runs repo code). Each target runs for min(10, remaining-5)s, at most REVIEW_FUZZ_MAX (default 5) targets and --timeout seconds in total, inside its own process group so no fuzz.test worker is orphaned. One go-fuzz-crash row per crasher names its testdata/fuzz corpus path; the crasher file is deleted after the row (its input is quoted in the message), so the audited tree is left as found. A missing go, go older than 1.20, an over-cap target and a spent time budget are named "not run" lines via skip(); GOFLAGS is prepended to, not replaced. atheris, cargo-fuzz and jazzer targets are fuzz-target-inventory rows under --full (detected, not run). Documented in the script header and usage and in references/tool-hub.md (size-budget-raise marker in the changelog fragment). scripts/test-review-checks-fuzz.sh covers default --full not fuzzing, --full-history not fuzzing, REVIEW_FUZZ_MAX, the time cap, old and missing go, and crash cleanup with a stub go (always runs), plus a real-go case on scripts/fixtures/tool-probes/go-fuzz that skips without go. Tests: 19/19 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B4dfwdDQiF3RQMUqYBqefc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds opt-in Go native fuzzing to
review_checks.sh, enabled with--fuzzorREVIEW_FUZZ=1. Default--fullruns do not fuzz.What it does
func Fuzz*targets in Go packages and runsgo test -run '^$' -fuzz '^Name$' -fuzztime <cap>once per target. The time cap and the target count are bounded byREVIEW_FUZZ_TIMEandREVIEW_FUZZ_MAX.fuzzrow with the crasher path. If go prints no "Failing input" line, it reports a named skip and the hub continues.^testdata/fuzz/<Name>/<hex>$before it is read or removed./dev/null.-mod=readonlyis passed as a go argument, so the user'sGOFLAGScannot override it.Tests
scripts/test-review-checks-fuzz.sh: 19/19 under/bin/bash3.2. Cases:The size gate passes.
tool-hub.mdrises from 63131 to 63930 bytes; the marker is in the changelog fragment.🤖 Generated with Claude Code
https://claude.ai/code/session_01B4dfwdDQiF3RQMUqYBqefc