feat(lens): mcp — MCP manifest inventory + rug-pull (drift) detection - #4
Merged
Conversation
The baseline pins specific reviewed findings; this is the broad dial for the
daily marketplace noise. Two settings, applied after suppression:
• Provenance: a finding whose location matches HONEY_TRUSTED_PATTERNS
(default claude-plugins-official) is first-party; the report tags it
[1st-party].
• Severity floor: a finding escalates OVERALL only at/above the floor for its
provenance (HONEY_VERDICT_FLOOR / HONEY_VERDICT_FLOOR_TRUSTED). Below-floor
findings move to a non-blocking "review" tier — still printed and counted
(`OVERALL: … (65 review)`), but they don't flip the verdict.
Every classified finding now carries _provenance and _blocking; report.sh /
daily-cycle.sh (and the PowerShell mirrors) share the same classification, so
they agree. A review-only run is CLEAN.
Safe by default: floors default to `none` (everything blocks, as before) — a
security tool must not silently hide findings out of the box. Overrides that
the floor can never mute: bumblebee always blocks (known-compromised catalog),
and a MUTATED pin always blocks (rug-pull tripwire); incomplete/scan_error are
never reclassified.
Multi-OS parity: lib/verdict.sh + win/lib/Verdict.psm1; report/daily-cycle
updated on both sides. shellcheck clean; PSScriptAnalyzer clean; default verdict
unchanged when no floor is set. Docs: docs/VERDICT.plan.md, README (section +
3 config vars), routine-prompt.md + triage-guide.md (the review tier).
Stacked on feat/suppression-baseline.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A honey-native lens targeting the scanner-evasion classes static pattern
scanners (incl. skillspector's frozen patterns) miss, over agent-skill and
instruction files:
• invisible Unicode — tag chars U+E0000-E007F (ASCII smuggling): no legit
text use, carry hidden instructions past humans and byte scanners.
• bidirectional overrides — U+202A-202E / U+2066-2069 (Trojan Source):
reorder how text renders vs. is interpreted.
• zero-width — U+200B/200C/2060/180E (excludes the emoji ZWJ U+200D to avoid
false positives).
• remote includes — instructions telling the agent to fetch/read a remote URL
at runtime (content the on-disk scan never sees).
Contract-compliant lens: bash uses perl (self-skips with a "skipped" verdict if
perl is absent — honey's core path unaffected); the Windows mirror uses native
.NET Rune enumeration (no perl). Verified behavior-identical on fixtures
(tag/bidi/zero-width/remote all caught; a clean file with an emoji ZWJ and a
plain URL correctly NOT flagged). Fast: ~0.17s over real skill roots.
Its findings ride the existing baseline + verdict policy (first-party
remote-include docs land in the review tier / can be pinned). doctor.sh +
doctor.ps1 report the lens; README lens table + config updated. shellcheck
clean; PSScriptAnalyzer clean.
Stacked on feat/verdict-policy.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closes honey's biggest coverage gap: an MCP server defined by a .mcp.json or
host config with no SKILL.md is invisible to skillspector. This native lens
inventories every MCP server (host configs: Claude/Cursor/VS Code/Windsurf, plus
every .mcp.json under the project roots) and implements the canonical rug-pull
defense — "hash the manifest on first sight, diff every subsequent run":
• MCP-DRIFT (high) — a known server's definition CHANGED since last run
(the manifest-alteration rug-pull vector).
• MCP-NEW (low) — a server appeared that wasn't there before.
• MCP-RISKY (medium) — launch command fetches-and-executes remote code
(curl|wget | sh/bash, bash -c, eval).
The first run SEEDS the baseline manifest silently (no drift/new spam on a fresh
box); detection starts the next run. Hashes are stored in a gitignored
.mcp-state.json (HONEY_MCP_STATE). Content-based RISKY fires every run.
On a real machine this inventories 23 MCP servers across host configs that honey
could not see before. Findings ride the baseline + verdict policy like any lens.
Offline: bash uses jq (deep-sorted canonical via `jq walk`); the Windows mirror
uses native .NET (recursive key sort). Verified behavior-identical: seed →
unchanged → drift + new + risky. shellcheck clean; PSScriptAnalyzer clean.
doctor/doctor.ps1 report the lens; README lens table + config + "what each
answers" updated; .gitignore excludes the state file.
Stacked on feat/lens-hardening.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
eric-sabe
force-pushed
the
feat/lens-hardening
branch
from
July 7, 2026 23:40
82b6396 to
61fab25
Compare
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.
Stacked on #3 → #2 → #1. Review/merge in order.
What & why
honey's biggest blind spot: an MCP server defined by a
.mcp.json/ host config with noSKILL.mdis invisible to skillspector. This native lens inventories every MCP server (host configs for Claude/Cursor/VS Code/Windsurf + every.mcp.jsonunder the project roots) and implements the research's #1 rug-pull defense — hash the manifest on first sight and diff every subsequent run:curl|wget | sh/bash,bash -c,eval).On a real machine it inventories 23 MCP servers across host configs honey could not see before.
Design
.mcp-state.json(HONEY_MCP_STATE).mcpServers,servers, and per-projectprojects[].mcpServers.Parity & gates
Offline. bash uses jq (deep-sorted canonical via
jq walk); Windows mirror uses native .NET (recursive key sort). Verified behavior-identical across bash + pwsh: seed → unchanged → drift + new + risky. shellcheck clean; PSScriptAnalyzer clean.doctor/doctor.ps1report it; README +.gitignoreupdated.🤖 Generated with Claude Code