Repository navigation
fix(mcp): a re-baseline is not a first sighting - #147
Merged
Merged
Conversation
Closes #146. Corrects the migration shipped in #144. That migration made a baseline computed under an older FINGERPRINT_VERSION re-baseline rather than report a change, which stopped a false rug pull on every server on upgrade day. It returned `new` to do it, and `new` already means "we had never seen this server". So the two were indistinguishable, and they carry different evidence. If a server was already poisoned before the upgrade, the re-baseline adopts the poisoned state as trusted and reports it under a word that also means nothing has ever been wrong here. That trades a loud false positive for a silent false negative, which is the worse half of the trade for a recorder, and it is the same trust-on-first-use hole that a reviewer had already raised about installation timing. #144 reintroduced it at the upgrade instead of the install, and for every server at once. `classify_observation` now returns `rebaselined`. The event carries a distinct reason saying the baseline was not compared against its predecessor, and a structured `unverified_baseline` flag so a SIEM can count them rather than match prose. It stays outcome `success` and carries no ATLAS technique, because adopting a baseline is not a rug pull. The test that pinned the old behaviour asserted the verdict was `new`, which was exactly the wrong thing to be satisfied by. It now asserts the two statuses differ, and a second test pins that the distinction survives into the trail rather than living only in the verdict. Ruleset fingerprint unchanged at 15846a0915769d4a. Reported by @Santoshkumarpuppala, who has now corrected two of these designs before they shipped and one after. Co-Authored-By: Claude Opus 5 <[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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #146. Corrects the migration I shipped in #144 yesterday.
What was wrong
#144 made a baseline computed under an older
FINGERPRINT_VERSIONre-baseline rather than report a change, so the release that closed the_metablind spot would not alert on every server on upgrade day. That part was right.It returned
newto do it. Andnewalready means "we had never seen this server".So the two became indistinguishable, and they carry different evidence:
newnew(before this PR)If a server was already poisoned before the upgrade, the re-baseline adopts the poisoned state as trusted and reports it under a word that also means nothing has ever been wrong here.
That trades a loud false positive for a silent false negative, which is the worse half of the trade for a recorder. It is also the same trust-on-first-use hole a reviewer had already raised about installation timing: a recorder installed after a swap has a permanently clean trail. #144 reintroduced it at the upgrade rather than the install, and for every server at once.
The fix
unverified_baselineis structured rather than left in prose, so a SIEM can count unverified baselines instead of matching a reason string. The status stayssuccessand carries no ATLAS technique, because adopting a baseline is not a rug pull.This is the same principle already used elsewhere here: coverage reports four states rather than a boolean so
unknowncannot be read asfine, and a failed listing emitsunavailablerather than nothing. The migration was the one place it was skipped.The test was pinning the bug
test_a_baseline_from_the_old_hashing_re_baselines_instead_of_alertingasserted the verdict wasnew. That was exactly the wrong thing to be satisfied by, and it passed while the defect existed. It now asserts the two statuses differ, and a second test pins that the distinction survives into the trail rather than living only in the verdict.1,166 tests pass, ruff clean, ruleset fingerprint unchanged at
15846a0915769d4a.Reported by @Santoshkumarpuppala, who has now corrected two of these designs before they shipped and one after.
🤖 Generated with Claude Code