Skip to content

fix(review): bind scan coverage to per-tool definition hashes - #1533

Merged
Dumbris merged 1 commit into
mainfrom
fix/issues-w5b8-internal-runtime-review-intern
Oct 6, 2026
Merged

Dumbris merged 1 commit into
mainfrom
fix/issues-w5b8-internal-runtime-review-intern

Conversation

@Dumbris

@Dumbris Dumbris commented Oct 6, 2026

Copy link
Copy Markdown
Member

Summary

Review-queue scan coverage is now bound to each tool's definition, not just its name and the scan timing window. A definition swapped inside the timing window is no longer shown as covered by an earlier scan.

Items

  • Final done-check residuals (Spec 108/109 UX effort) #1466 (scan coverage vs. swapped tool definition)
    • Root cause: reviewToolCovered matched on tool name plus timing only, so a tool whose definition changed after the scan but inside the window still appeared covered.
    • Change: scans record a digest of each exported tool definition (ScanContext.tool_hashes, built in internal/security/scanner/service.go, helper in internal/hash/hash.go). reviewToolCovered (internal/runtime/review.go) requires the digest to match the approval record's current definition. Legacy scans without the field keep the name and timing rules. The digest covers description and input schema (what scanners read), not the output schema.
    • Tests: internal/runtime/review_scan_coverage_test.go, internal/security/scanner/export_tool_names_test.go. Docs: docs/features/security-quarantine.md.

Skipped items

None.

Design choice

The digest covers description and input schema only, not the output schema. Trade-off: it matches reliably without depending on fields the scanner export omits, but an output-schema-only change does not invalidate coverage. Legacy scans without hashes fall back to the previous name and timing behavior. This awaits maintainer review.

Review Status

clean after 1 round(s), unresolved findings []

Refs #1466

…1466)

Scans now record a digest of each exported tool definition
(ScanContext.tool_hashes). reviewToolCovered requires the digest to match
the approval record's current definition, so a definition swapped inside
the timing window is no longer shown as covered. Legacy scans without the
field keep the name and timing rules. The digest covers description and
input schema (what scanners read), not the output schema, so it matches
without depending on fields the export omits.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 37a25ed
Status: ✅  Deploy successful!
Preview URL: https://75d657b5.mcpproxy-docs.pages.dev
Branch Preview URL: https://fix-issues-w5b8-internal-run.mcpproxy-docs.pages.dev

View logs

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: fix/issues-w5b8-internal-runtime-review-intern

Available Artifacts

  • archive-darwin-amd64 (31 MB)
  • archive-darwin-arm64 (28 MB)
  • archive-linux-amd64 (19 MB)
  • archive-linux-arm64 (17 MB)
  • archive-windows-amd64 (31 MB)
  • archive-windows-arm64 (27 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (27 MB)
  • installer-dmg-darwin-arm64 (24 MB)
  • smart-mcp-proxymcpproxy-goNDL4JL.dockerbuild (0 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 37448178683 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 70.00000% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/hash/hash.go 0.00% 9 Missing ⚠️
internal/security/scanner/service.go 82.35% 5 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@Dumbris
Dumbris merged commit 53e541d into main Oct 6, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants