Repository navigation
docs: design record for pinning upstream definitions - #53
Merged
Merged
Conversation
A tool definition is the instruction set a model acts on and the annotations a policy decides with, and fold re-reads it on every cache refill without comparing it to anything. The approval that mattered — someone reading a tool list and accepting the federation — is pinned to nothing, so a tool can acquire new instructions afterwards and be served with the same namespace, grant, and trail as the one that was approved. Nothing in the tree hashes what an upstream advertises. The answer is arithmetic rather than judgement: hash name, description, schemas, and annotations in the upstream's own terms, keep the baseline in state.Store so a fleet agrees and a rolling restart does not silently re-pin, and report a difference. Content inspection stays declined — a hash cannot be taught to have opinions — and the whole cost lands on the list-refill path where json.Unmarshal already is. Annotations are in the digest deliberately: once policy depth ships destructive gating, a tool flipping destructiveHint has edited its authorization rather than its documentation, performed by the party being gated. The record stops short of a full plan, which is the point of writing it down. Detection has no open questions. Prevention does: legitimate change and attack are the same bytes, so blocking needs an adoption path, and every candidate either invents a write path into running state or hands operators a hand-copying chore. That is an operator's call, and it is named rather than guessed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
A tool definition is the instruction set a model acts on and the annotations a policy decides with. fold re-reads it from the upstream on every cache refill and compares it to nothing —
grep -rn sha256finds discovery hashing its own document and nothing else.So the approval that mattered, someone reading a tool list and accepting the federation, is pinned to nothing. A tool can acquire new instructions after acceptance and be served with the same namespace, the same policy grant, and the same audit trail as the one that was approved. This is the ecosystem's most-published attack and the answers on offer elsewhere are scanners.
The shape
Arithmetic rather than judgement: hash name, title, description, schemas, and annotations in the upstream's own terms; keep the baseline in
state.Storeso a fleet agrees; report a difference. fold never asks whether a description is malicious, only whether it is the same one — which keeps inline content inspection declined rather than smuggled in through a side door.Three things the record argues that are worth reading:
Annotations are in the digest deliberately. Once policy depth ships destructive gating, a tool flipping
destructiveHinthas edited its authorization rather than its documentation — an escalation performed by the party being gated. That record already concedes annotations are a hygiene control for federations you operate; this is the control that makes the hygiene checkable.The baseline is shared state because of the attack, not for tidiness. A per-instance baseline means every pod trusts what it saw first, so a rolling restart re-pins the whole federation to whatever is current — precisely the moment worth choosing if you are the one changing a definition.
Trust-on-first-use cannot vouch for the first definition, and the record says so plainly rather than letting a reader assume otherwise. What it converts is "the tools are what you approved" from an assumption into a checked fact.
Where it stops, on purpose
Detection (
warn) has no open questions. Prevention (block) has one that is the operator's rather than the design's: legitimate change and attack are the same bytes, so blocking needs a way to adopt a new definition, and all four candidates are compromised — reload-adopts closes the detection window on routine config pushes, afold pinCLI invents a write path into running state, config-declared hashes are GitOps-clean but a hand-copying chore, and no-adoption is brittle to the point of uselessness.The recommendation is to ship detection and leave blocking unbuilt until someone says detection is insufficient. The record names the choice instead of guessing at it.
Docs only. Added to the roadmap as Horizon 2 item 14.
🤖 Generated with Claude Code