fix: include annotations in tool quarantine hash with backward compatibility#343
Merged
fix: include annotations in tool quarantine hash with backward compatibility#343
Conversation
…ibility The tool quarantine hash now includes serialized annotations to detect "annotation rug-pulls" (e.g., a server flipping destructiveHint from true to false). Two backward-compatibility mechanisms ensure existing approved tools are not falsely flagged as changed: 1. When approved hash matches the current hash but status was incorrectly set to "changed" by a prior binary, restore to approved. 2. When approved hash matches the legacy formula (without annotations), silently re-approve with the new hash format. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deploying mcpproxy-docs with
|
| Latest commit: |
bbf5837
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fe8ae82b.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://fix-tool-quarantine-annotati.mcpproxy-docs.pages.dev |
Replace always-true save condition with needsSave flag that only triggers writes when status is restored or current hash differs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hardcoded expected SHA-256 values for known inputs. If anyone changes the hash formula, this test fails with a clear message explaining that backward compatibility migration is required before updating the golden values. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
destructiveHintfromtruetofalse)Test plan
go buildsucceeds🤖 Generated with Claude Code