Skip to content

feat(plugins): add install-time reputation and typosquat scanning#6448

Merged
bug-ops merged 2 commits into
mainfrom
feat/issue-5864/parity-zeph-plugins-lacks-inst
Jul 18, 2026
Merged

feat(plugins): add install-time reputation and typosquat scanning#6448
bug-ops merged 2 commits into
mainfrom
feat/issue-5864/parity-zeph-plugins-lacks-inst

Conversation

@bug-ops

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

Copy link
Copy Markdown
Owner

Summary

  • Adds a local, offline-first advisory check at plugin install time that warns when an incoming plugin/skill name closely resembles a bundled or already-installed name (e.g. github-pr vs. legitimate git-pr), closing the parity gap with IronClaw's Community Scanner
  • ReputationSource trait + LocalTyposquatCheck (hand-rolled Levenshtein similarity, no new runtime dependency), pluggable for a future external reputation source
  • Wired into all three plugin install entry points: PluginManager::add, the --plugin-url ephemeral path, and the auto-update path — no entry point silently bypasses the check
  • New [plugins.reputation] config section, CLI --strict-reputation flag, --init wizard prompt, config migration step
  • Advisory by default (non-blocking warning); enforcement = block returns PluginError::ReputationBlocked before any files are written
  • Spec promoted into the canonical /specs/079-plugins/spec.md (§16) per this project's mandatory spec registration rule

Closes #5864

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings
  • cargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins (14346/14346 passing)
  • Rustdoc gate (RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace ...)
  • gitleaks protect --staged — no leaks
  • Unit tests: Levenshtein/similarity/check logic, including the github-pr/git-pr motivating example and the hyphen-strip raw-equality boundary case
  • Integration tests: advisory warns + still installs, block mode errors + nothing written to disk, disabled mode is a genuine no-op, auto-update parity (asserts the warning is actually emitted, not just that the call returns Ok)
  • Permanent regression test against the real bundled_skill_names() corpus (0 internal collisions at the shipped threshold)
  • Live-testing playbook and coverage-status row added to .local/testing/ in the main repo

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate dependencies Dependency updates enhancement New feature or request size/XL Extra large PR (500+ lines) labels Jul 18, 2026
@bug-ops
bug-ops enabled auto-merge (squash) July 18, 2026 13:03
bug-ops added 2 commits July 18, 2026 15:03
Closes #5864

Adds a local, offline-first advisory check that warns when an
incoming plugin or skill name closely resembles a bundled or
already-installed name (e.g. github-pr vs. legitimate git-pr),
closing the parity gap with IronClaw's Community Scanner.

- ReputationSource trait with a LocalTyposquatCheck implementation
  (hand-rolled Levenshtein similarity, no new dependency), pluggable
  for a future external reputation source (US-003)
- Wired into all three plugin install entry points: PluginManager::add,
  the --plugin-url ephemeral path, and the auto-update apply path, so
  no entry point silently bypasses the check
- New [plugins.reputation] config section (enabled, similarity_threshold,
  min_name_len, enforcement=warn|block), CLI --strict-reputation flag,
  --init wizard prompt, and a config migration step
- Advisory by default (surfaces a warning, does not block); enforcement
  = block returns PluginError::ReputationBlocked before any files are
  written
- Promotes the feature's spec into the canonical /specs/079-plugins/spec.md
  (was drafted at .local/specs/043-plugin-install-reputation-scanning/spec.md
  during design, per CLAUDE.md's mandatory spec registration rule)
@bug-ops
bug-ops force-pushed the feat/issue-5864/parity-zeph-plugins-lacks-inst branch from 6ff787f to c37110f Compare July 18, 2026 13:21
@bug-ops
bug-ops merged commit 722f900 into main Jul 18, 2026
43 checks passed
@bug-ops
bug-ops deleted the feat/issue-5864/parity-zeph-plugins-lacks-inst branch July 18, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parity: zeph-plugins lacks install-time reputation/typosquat scanning (IronClaw pattern)

1 participant