Repository navigation
finding: use gofuzz build tag to select probe definition source - #5423
Open
Aastha-spec-tech wants to merge 1 commit into
Open
Aastha-spec-tech wants to merge 1 commit into
Aastha-spec-tech wants to merge 1 commit into
Conversation
Introduces probe_def.go (normal builds) and probe_def_gofuzz.go (OSS-Fuzz builds) so that the probe definition path is selected at compile time via the gofuzz build constraint, rather than rewriting source with sed. Adds a check-fuzz-build Makefile target and CI step to keep the gofuzz-only files from silently breaking. Fixes ossf#5193 Signed-off-by: Aastha-spec-tech <explorething12345@gmail.com>
Aastha-spec-tech
requested review from
justaugustus
and removed request for
a team
November 6, 2026 07:00
Aastha-spec-tech
temporarily deployed
to
integration-test
November 6, 2026 07:00 — with
GitHub Actions
Inactive
Aastha-spec-tech
temporarily deployed
to
gitlab
November 6, 2026 07:00 — with
GitHub Actions
Inactive
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5423 +/- ##
===========================================
+ Coverage 66.80% 79.11% +12.30%
===========================================
Files 230 262 +32
Lines 16602 14823 -1779
===========================================
+ Hits 11091 11727 +636
+ Misses 4808 3095 -1713
+ Partials 703 1 -702 🚀 New features to boost your workflow:
|
This branch was previously deployed
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.
What does this PR do?
Fixes #5193
currently, OSS-Fuzz uses
sedinbuild.shto modifyfinding/probe.goso that probe definitions are read from/tmp/probedefinitionsinstead of the embedded filesystem.this works, but it means the build depends on modifying source code before compilation. If the function changes during a refactor, the replacement could break without being noticed.
this pr handles the difference using go build tags instead:
finding/probe_def.gohandles normal builds and reads definitions from the embeddedembed.FS.finding/probe_def_gofuzz.gois used for OSS-Fuzz builds and reads definitions from/tmp/probedefinitions/<probeID>/def.yml.both files implement the same
readProbeDefinitionhelper, which is called fromfinding/probe.go. this removes the need for thesedworkaround inbuild.sh.I also added a
check-fuzz-buildMakefile target and a CI step to make sure the gofuzz-specific files are compiled and checked on every PR.Testing
make check-fuzz-buildpasses.make unit-testpasses (90 packages).golangci-lintreports no new issues with both normal and--build-tags gofuzzbuilds.build_fuzzers,check_build, andrun_fuzzer. All passed, with 54,818 runs and no crashes.