Repository navigation
Ask which advisories apply, without sending the boot log - #12
Merged
Merged
Conversation
The client half of a design whose server half already shipped. The applicability endpoint and the terminal login that reaches it both existed; nothing in the CLI called them, so the feature was a road and a set of keys with no car. A consultant cannot upload a client's boot log. That is a contract matter, not a preference, and it is the objection that keeps this tool out of the segment it fits best. Shipping the curated ruleset down to the client instead would hand over the one asset that compounds. So neither travels: the detectors run locally, exactly as for a plain scan, and only product names and version strings go up. The guarantee is structural rather than a promise. The payload is built from a fixed map of three detector labels to three product names, every value is re-validated against the server's own limits before it leaves, and there is no field a log could occupy. A test asserts that adding one breaks the build. Verified against the Android corpus capture, which carries androidboot.serialno=, vbmeta.device_state=unlocked and androidboot.selinux=permissive, and yields exactly two version strings. --dry-run prints the exact JSON and exits. That is how a consultant shows a client what leaves the machine, so it is documented as a headline capability rather than a debugging aid. The label-to-product translation is the part that would have failed silently. The server matches lowercase product names, so sending "Bootloader" or "U-Boot 2020.10" returns nothing while looking like a server fault. Only U-Boot, Linux and BusyBox currently map to something the catalog holds; the other eleven detectors are not CVE-tracked products and are deliberately absent. A 422 from the server is reported as a bug in this client, not user error, because the same rules are enforced here first. A 403 says local identification still works and how. Verified live end to end: `bootintel login` against the running server, then `scan --applicability` sending 2 components and receiving 67 verdicts, every one a bounded_range match, with "the boot log stayed here" in the output. The probe account and its authorizations were removed afterwards. Verified: 308 tests pass, clippy clean under -D warnings, rustfmt clean, cargo deny reports advisories, bans, licenses and sources all ok. Co-Authored-By: Claude Opus 5 (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.
The client half of a design whose server half already shipped. The applicability endpoint and the terminal login that reaches it both existed; nothing in the CLI called them.
The guarantee is structural, not a promise. The payload is built from a fixed map of three detector labels to three product names, every value is re-validated against the server's own limits before it leaves, and there is no field a log could occupy. A test asserts that adding one breaks the build.
Verified against
sample_logs/bootintel-24.txt, which carriesandroidboot.serialno=,vbmeta.device_state=unlockedandandroidboot.selinux=permissive. It yields two version strings and nothing else.--dry-runis a headline capability, not a debug switch. It is how a consultant shows a client what leaves the machine.The translation is the part that would have failed silently. The server matches lowercase product names, so sending
BootloaderorU-Boot 2020.10returns nothing while looking like a server fault. Only U-Boot, Linux and BusyBox map to something the catalog holds; the other eleven detectors are not CVE-tracked products and are deliberately absent.A 422 is reported as a bug in this client rather than user error, since the same rules are enforced here first. A 403 says local identification still works and how.
Verified live:
bootintel loginagainst the running server, thenscan --applicabilitysending 2 components and receiving 67 verdicts, every onebounded_range. Probe account removed afterwards.308 tests pass, clippy clean under
-D warnings, rustfmt clean,cargo deny checkall ok.