Skip to content

feat(testing): add plugin_manifest fuzz target and coverage reporting#6375

Merged
bug-ops merged 1 commit into
mainfrom
feat/issue-6370/fuzz-plugin-manifest-target
Jul 17, 2026
Merged

feat(testing): add plugin_manifest fuzz target and coverage reporting#6375
bug-ops merged 1 commit into
mainfrom
feat/issue-6370/fuzz-plugin-manifest-target

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a 5th fuzz target fuzz/fuzz_targets/plugin_manifest.rs fuzzing toml::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.
  • Wires a coverage CI job into .github/workflows/fuzz.yml that runs cargo +nightly fuzz coverage <target> for all 5 targets against their committed seed corpora and uploads text/HTML reports as artifacts. Fully independent job (no needs:, no shared outputs) — cannot affect the crash-finding fuzz job's pass/fail. Every generation step uses continue-on-error: true, since visibility is the goal for this iteration, not gating.
  • Works around a cargo-binutils 0.4.0 cargo cov --/cargo profdata -- panic (clap ArgAction bug, reproduces even on bare --help) by invoking rust-cov directly — documented in both the workflow and fuzz/README.md.
  • Scopes GitHub Actions permissions per-job (fuzz: contents: read + issues: write for its crash-issue-filing step; coverage: contents: read only) instead of workflow-level, following least privilege.
  • fuzz/README.md updated: target table, corpus docs, new "Corpus pollution warning" (local cargo fuzz run writes coverage-increasing inputs directly into the corpus dir — use a scratch dir or git status before staging), and a note that PluginSource (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 list includes plugin_manifest (5 targets total)
  • Seed corpus present and non-empty: 6 hand-authored .toml manifests covering minimal/full/nested-table/array/optional-field/invalid-name shapes
  • Local smoke run (cargo +nightly fuzz run plugin_manifest -- -max_total_time=...): 0 crashes
  • rust-cov report locally confirms seed corpus reaches 100% region/line/function coverage of PluginManifest's Deserialize path
  • cargo +nightly fmt --check, cargo clippy --all-targets -- -D warnings clean on fuzz/ (workspace-excluded, checked standalone)
  • fy parse / fy lint clean on fuzz.yml (0 errors)
  • gitleaks protect --staged clean
  • CHANGELOG.md, .local/testing/playbooks/fuzzing.md, .local/testing/coverage-status.md updated
  • Follow-up after merge: trigger workflow_dispatch on fuzz.yml to confirm the coverage job goes green in real CI — cargo-fuzz and cargo-binutils aren't in install-action's curated tool manifest, so both install via the slower binstall/cargo-install fallback (same mechanism the existing fuzz job already relies on, but unverified for this new job specifically)

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
@github-actions github-actions Bot added enhancement New feature or request documentation Improvements or additions to documentation dependencies Dependency updates config Configuration file changes size/L Large PR (201-500 lines) ci CI/CD configuration and removed enhancement New feature or request labels Jul 17, 2026
@bug-ops
bug-ops merged commit 3fd3bf3 into main Jul 17, 2026
43 checks passed
@bug-ops
bug-ops deleted the feat/issue-6370/fuzz-plugin-manifest-target branch July 17, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD configuration config Configuration file changes dependencies Dependency updates documentation Improvements or additions to documentation size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fuzz: wire cargo-fuzz coverage reporting into fuzz.yml fuzz: add plugin_manifest target (untrusted marketplace TOML)

1 participant