Repository navigation
fix(review): bind scan coverage to per-tool definition hashes - #1533
Merged
Merged
Conversation
…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.
Deploying mcpproxy-docs with
|
| 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 |
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 37448178683 --repo smart-mcp-proxy/mcpproxy-go
|
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
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
reviewToolCoveredmatched on tool name plus timing only, so a tool whose definition changed after the scan but inside the window still appeared covered.ScanContext.tool_hashes, built ininternal/security/scanner/service.go, helper ininternal/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.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