fix(status): fail closed when the baseline cannot identify the binary - #3
Merged
Merged
Conversation
software-status reported current=true after the managed executable was
replaced. The check that would have caught it does exist:
if binary_sha != executable_baseline.get("sha256"):
drift.append("baseline_binary_sha256")
but the whole block sits behind `if isinstance(executable_baseline, dict)`,
and only darwin-arm64 declares that object. The five remaining assets --
every Linux one among them -- have no `executable` baseline, so on those
platforms the strongest verification silently disappeared and status still
answered current.
The manifest cannot stand in for it. It lives beside the binary and is just as
writable, so whoever replaced one replaced both; the stub in the private slice
does exactly that and was reported as current.
A baseline that omits the extracted-binary identity cannot answer "is this the
software we installed", so status now says so through
`baseline_executable_unavailable` instead of skipping the question and
returning current anyway. This makes the five missing baselines visible rather
than silently trusted -- populating them is vendor-observation work.
Reviewer finding RVR-P2-007. status still never executes the binary.
Claude-Session: https://claude.ai/code/session_017fG88hR3mfP7YMFABzbKPB
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.
Problem
software-statusreportedcurrent: trueafter the managed executable was replaced.The check that would have caught it exists:
but the whole block sits behind
if isinstance(executable_baseline, dict), and the baseline declares that object for only one of six assets:executablebaselineSo on every Linux platform the strongest verification silently disappeared and status still answered
current.Why the manifest is not a substitute
binary_sha256insoftware/mimocode.jsonis self-reported: the manifest sits beside the binary and is equally writable, so whoever replaced one replaced both. The private slice's stub does exactly that — writes a coherent manifest for a substituted binary — and was reported as current.Change
A baseline that omits the extracted-binary identity cannot answer "is this the software we installed". Status now says so through
baseline_executable_unavailablerather than skipping the question and returningcurrentanyway.This makes the five missing baselines visible instead of silently trusted. Populating them is vendor-observation work and is deliberately not bundled here.
statusstill never executes the managed binary — that property is unchanged and still asserted.Verification
test_software_status_reports_stub_identity_drift_without_executing_mimo— was failing, now passestest_software_status_never_executes_target_binary— was failing, now passesrun_harnesses.py --module nddev-mimocode-app --lane platform --platform ubuntu— PASScli-tools/validate_public_contracts.py— okruff check/ruff format --checkcleanReviewer finding RVR-P2-007.
https://claude.ai/code/session_017fG88hR3mfP7YMFABzbKPB