fix(integrity): re-baseline anchor on legitimate release upgrade#1263
Merged
Conversation
Legitimate version bumps that change CRITICAL_MODULES no longer false-tint as tampered when reusing SQLite; same-label hash drift still tampers (#1262).
Prove release upgrade stays clean (suffix empty) while same-label drift still forces -alpha via is_tampered / alpha_version_suffix (#1262).
2 tasks
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
Fixes false
integrity_state=tampered/-alphaafter a legitimate package upgrade that reuses the same SQLite DB (reproduced:pipx upgradepost4→post5 + sharedaudit_demo.db).Cause: E.3 re-verify compared module hashes without checking whether
release_labelchanged.Fix: when stored
release_label≠ current_release_label(), UPDATE the single anchor row to the new baseline and append are-baselineevent. Same label + hash drift still tampers (not softened). Aligns with E.6 (tamper-evident, not proof).Related: #1262 (issue exists; no auto-close — link only).
Test plan
./scripts/check-all.sh --enforcedvalidated+re-baselineevent + one rowtamperedSecurity note
Re-baseline only on
release_labelchange. GATE_FILE untouched.Made with Cursor