patchbay audit
·5 min read

Depth pass, week 48: 38 checks all the way through

Two days ago patchbay's public leaderboard showed five scoring buckets: HSTS-MISSING, XFO-MISSING, NOSNIFF-MISSING, DCR-OPEN-HTTPS, ISS-PARAM-MISSING. 38 real checks lived in the audit-core package but the crawler ran its own homemade scorer that never called them.

This week we closed that gap. Here's the short version of what shipped and what showed up.

What shipped

  • Phase A: crawler now calls tools/list, resources/list, prompts/list and captures advertisedCapabilities + serverInfo. POISONING-001/002/003, ANNOTATIONS-001, DEPRECATED-001, SAMPLING-001, URITEMPLATE-001, SDK-CVE-001 can finally fire.
  • Phase B: DCR loopback probe for tier-2/3 servers. AUTH-006 populated at crawl scale.
  • Phase C: golden-corpus validation harness. 13 hand-crafted TargetSnapshot cases, per-pipeline FP/FN measurement committed with every release.
  • Phase D: POISONING-003 soft-imperative pattern. Catches "first call X on Y" tool-output injection that the previous regex set missed.
  • Phase E: two new checks backed by real 2026 CVEs — SESSION-BINDING-001 (CVE-2026-52869) and UPSTREAM-IDENTITY-BYPASS-001 (CVE-2026-110278/9). More detail in the companion post.

What the leaderboard looked like before vs. after

MetricBefore (2026-11-23 morning)After (2026-11-24 evening)
Cohort1,4551,473
Grade A513633
Grade B179342
Grade C454252
Grade D12690
Grade F183156
D or F309246
high-severity findings129424

Fewer D/F, more A/B. More high-severity findings. That's not a contradiction — it's what honest grading looks like when the scorer finally has context.

The old homebrew scorer applied blanket penalties: missing X-Frame-Options was −5 regardless of tier. audit-core is context-sensitive: XFO-MISSING on a public-by-design MCP endpoint isn't a real severity, so the server doesn't get dragged down for it. Fewer unfair D/F grades (−63).

But the real OAuth posture and tool-metadata gaps that were silently invisible before — poisoning, annotations drift, deprecated capabilities, loopback-redirect rejection, session reuse — now get surfaced. 295 more high-severity findings across the 1,473-server cohort. That's not inflation. It's what we were supposed to be measuring all along.

New finding types with their first-ever hits

CheckHitsWhat it catches
ANNOTATIONS-00168Tool annotation drift (readOnly/destructive hint mismatch)
DUAL-RESOURCE-00130Divergent PRM sources (Angelcam pattern)
DEPRECATED-00125Servers still negotiating sampling / logging / roots capabilities
AUTH-00620AS rejects loopback redirect (breaks native CLI auth)
SESSION-BINDING-00111Server reuses the same MCP session ID across inits
POISONING-0016Hidden U+200B / bidi in tool descriptions

Measuring the scanner itself

Phase C ships the quiet half of this. Per-check unit tests existed; nothing measured that the full ALL_CHECKS pipeline produces the expected set on realistic snapshot shapes. We built a 13-case golden corpus (clean tier-1, Angelcam-like, Andrii's POISONING-001 fixture, DUAL-RESOURCE skew, loopback reject, SESSION-BINDING sameSession, and the rest) and a harness that diffs expected vs. actual, writes bench/validation/validation-matrix.md with per-check FP/FN tallies, and exits non-zero on any regression.

Current matrix: 13/13 pass. Every check produces exactly the expected finding set on every case. If a PR ever regresses that, CI blocks the merge.

Run it

npx -y @patchbay-nebius/agent audit https://your-mcp.example.com/mcp

Leaderboard: patchbay-mcp.dev/leaderboard. Source: github.com/GodSmasher/patchbay.