feat(testing): add plugin_manifest fuzz target and coverage reporting#6375
Merged
Conversation
Add a 5th fuzz target for zeph-plugins' PluginManifest TOML deserialization, the untrusted marketplace/registry manifest ingestion surface, and wire cargo-fuzz coverage reporting into fuzz.yml so seed-corpus reach into gated parsing paths can be verified without a manual local run. Closes #6370 Closes #6373
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.
Summary
fuzz/fuzz_targets/plugin_manifest.rsfuzzingtoml::from_str::<zeph_plugins::manifest::PluginManifest>— the untrusted marketplace/registry plugin manifest ingestion surface (crates/zeph-plugins/src/manager/{registry,store,install,security}.rs), same threat model as the already-fuzzed SKILL.md frontmatter target.coverageCI job into.github/workflows/fuzz.ymlthat runscargo +nightly fuzz coverage <target>for all 5 targets against their committed seed corpora and uploads text/HTML reports as artifacts. Fully independent job (noneeds:, no shared outputs) — cannot affect the crash-findingfuzzjob's pass/fail. Every generation step usescontinue-on-error: true, since visibility is the goal for this iteration, not gating.cargo cov --/cargo profdata --panic (clapArgActionbug, reproduces even on bare--help) by invokingrust-covdirectly — documented in both the workflow andfuzz/README.md.fuzz:contents: read+issues: writefor its crash-issue-filing step;coverage:contents: readonly) instead of workflow-level, following least privilege.fuzz/README.mdupdated: target table, corpus docs, new "Corpus pollution warning" (localcargo fuzz runwrites coverage-increasing inputs directly into the corpus dir — use a scratch dir orgit statusbefore staging), and a note thatPluginSource(registry.rs:561) is a separate untrusted parse point intentionally left out of this target's scope.Closes #6370
Closes #6373
Test plan
cargo +nightly fuzz listincludesplugin_manifest(5 targets total).tomlmanifests covering minimal/full/nested-table/array/optional-field/invalid-name shapescargo +nightly fuzz run plugin_manifest -- -max_total_time=...): 0 crashesrust-cov reportlocally confirms seed corpus reaches 100% region/line/function coverage ofPluginManifest'sDeserializepathcargo +nightly fmt --check,cargo clippy --all-targets -- -D warningsclean onfuzz/(workspace-excluded, checked standalone)fy parse/fy lintclean onfuzz.yml(0 errors)gitleaks protect --stagedcleanCHANGELOG.md,.local/testing/playbooks/fuzzing.md,.local/testing/coverage-status.mdupdatedworkflow_dispatchonfuzz.ymlto confirm thecoveragejob goes green in real CI — cargo-fuzz and cargo-binutils aren't ininstall-action's curated tool manifest, so both install via the slower binstall/cargo-install fallback (same mechanism the existingfuzzjob already relies on, but unverified for this new job specifically)