← Back to Pull requests

test: install a network-booted server from its own screen, and check unknown firmware keys refuse to start it #644

Closed
unknown closed this pull request without merging on Nov 26, 2026 18:36 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 14:32 UTC
Author

Summary: Bluefin Server can be installed onto a disk from a machine that started over the network with no disk of its own. This adds an automatic check that does it the way a person at that machine's screen would: it logs in, types the install command from our guide, and answers the installer's questions about which disk to use, whether to wipe it and whether to add it to the boot menu. A second new check confirms that a computer which trusts only other companies' security keys refuses to start Bluefin at all, rather than starting it unprotected. Before this, nothing tested the typed network install or that refusal.

What I need from you: Add the full-build label so the boot test runs both new checks, then review.

---

What changes

Follows the approved direction on #450 (@jeefy's recommendation from 11-03, approved by @Danathar): reuse the existing console harness instead of writing a new one; a random root password for each run, sent to the machine only as a hash; firmware fixtures stay out of scope until shim is Microsoft-signed, plus one cheap refusal check.

Typed install from a diskless boot (DOGFOOD_INSTALL=diskless-console in scripts/dogfood-installer.sh)
1. Enrolls the Secure Boot keys from the netboot ESP (which is also the boot medium in this mode; no USB stick).
2. Boots the netboot ESP diskless (the OS DDI comes from a local HTTP server through import.pull), with the target disk and a second disk attached.
- Root password: 12 random bytes. Only the SHA-512 crypt hash reaches the guest, as passwd.hashed-password.root through the existing cred() SMBIOS helper. The hash file is mode 0600 and never uploaded. The plain text stays in the shell and is masked with ::add-mask:: on GitHub Actions. How production root is locked does not change.
- Logs in at tty1 through QEMU sendkey and the existing virtio tty1 mirror.
- Types the bash block under "From a diskless node" in docs/skills/ddi-installer.md, read from the doc at run time, so the doc and the test cannot drift apart.
- Answers stock systemd-sysinstall (v261 prompt strings): the target by its number in the disk list, erase, firmware registration yes, then yes at the summary. Before checking for "Installation succeeded.", it checks that the summary shows Selected Disk: <target>, Erase Disk: yes and Register in Firmware: yes. Then it powers off.
- On the host it checks that the target has exactly 3 partitions (ESP plus usr slot A and its verity, no _empty slot B yet) and that the second disk still has no partition table or filesystem.
3. Boots the installed disk with the same check_disk_boot / check_issue checks as the unattended path.

Supporting changes:

  • type_keys now covers the full US layout (shifted symbols and capitals) plus Ctrl-U, which clears the answer systemd's ask_string_full fills in ahead of time. The disk prompt prefills the disks' common /dev/disk/by- prefix, and the registration prompt prefills yes. An unmapped character now fails before any key is sent.

  • wait_question matches a question in the newest screen snapshot with all whitespace removed, because sysinstall's keep/erase question (about 125 columns) wraps on the console.

  • The doc's command block loses the /dev/sdX placeholder, so sysinstall asks for the disk. The doc now explains the questions and how to name the disk to skip the first one.
  • Foreign-key firmware refusal (DOGFOOD_FIRMWARE=foreign-keys in scripts/dogfood-diskless.sh)

  • Starts from Fedora's OVMF_VARS.secboot.fd (already in user mode, vendor keys enrolled, no Bluefin db). install-qemu-ovmf.sh extracts it from the same pinned RPM and exports it as OVMF_VARS_FOREIGN. I checked the pinned RPM's header and the file is listed there. ovmf_vars_foreign in dogfood-firmware.sh also looks in the Debian/Ubuntu *.ms.fd paths.

  • Passes only if OVMF prints BdsDxe: failed to load Boot#### ...: Access Denied (or Security Violation). It fails if successfully enrolled or Secure boot enabled appear, meaning systemd-boot or the kernel ran. This branch skips the "kernel ran with Secure Boot" check that the other refusals use.
  • CI wiring

  • scripts/ci/boot-test.sh: the firmware check goes in the diskless bucket, and the console install goes in the installer bucket, whose logs are kept even on success. Both run for releases and for everything else (16 → 18 scenarios outside releases, 12 → 14 in releases).

  • build.yml: the installer bucket now downloads image-set-{core,netboot,installer}.

  • Preflight requires openssl and OVMF_VARS_FOREIGN. openssl is added to the apt install.

  • Docs: ci-tooling.md describes both scenarios (reflowed to stay within its 500-line limit), and the shim section of ddi-installer.md points to the refusal check.
  • Verification


  • python3 -m pytest (whole unit suite, Python 3.11 here): 1812 passed. The 6 failures and 17 errors match a clean upstream/main checkout on this machine exactly. They come from Python 3.11 (PurePosixPath.full_match, test_track_binaries.py) and the local shellcheck 0.9.0.

  • New and updated tests:

  • - every character of the documented block, plus Ctrl-U, reaches a stand-in monitor as the right sendkey and reads back as the same text
    - an unmapped character sends nothing
    - the documented sysinstall call names no disk
    - wait_question finds a question split across 40-column lines and ignores one that is no longer on screen
    - the scenario counts
    - the diskless run's hash, credentials and disks stay out of the uploaded logs
    - a bucket downloads the netboot part when it runs diskless-console
    - the ovmf_vars_foreign lookup and preflight
  • python3 .github/scripts/docs-checks.py passes.

  • Host-side smoke runs with a stand-in qemu-system-x86_64 (no KVM on this machine):

  • - firmware: refusal → PASS; a store that enrolls our keys first → FAIL; DOGFOOD_BOOT=http combined with it → refused.
    - diskless console: step 1 and the whole of step 2 passed against an emulated monitor, tty1 mirror and sysinstall questions (login, typed block, disk 3 of 4 picked, erase/yes/yes, poweroff, host partition checks). Step 3 was not emulated.
  • Not run: a real boot on real QEMU. These things are known only from source, not from a live run: sysinstall's wording (read from systemd v261 sysinstall.c / prompt-util.c / terminal-util.c), OVMF's message (PlatformBmPrintScLib with DENY_EXECUTE_ON_SECURITY_VIOLATION), and the device names in the disk list. A full-build run will confirm them.
  • Partially addresses #450. Pre-Linux profile selection/capture, the external
    console-driver contract, and expanded resource/screenshot measurements
    remain tracked there.

    — hive: backend=omp model=anthropic/claude-opus-5-5

    ---
    🐝 Hive Agent: contributor | SHA: dbcb244

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: jeefy Review duration: 24724m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #644"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%