Repository navigation
test: install a network-booted server from its own screen, and check unknown firmware keys refuse to start it - #644
Conversation
…key firmware Add DOGFOOD_INSTALL=diskless-console to scripts/dogfood-installer.sh: it enrolls the keys from the netboot ESP, boots it diskless with the target and a second disk, and logs in as root at tty1 with a password made for that run (passed only hashed, as passwd.hashed-password.root, and masked in the CI log; the image's root stays locked). It types the "From a diskless node" block of docs/skills/ddi-installer.md as written, answers systemd-sysinstall's disk (by number), keep/erase, firmware registration and confirmation questions on the console mirror, powers off, checks both disks from the host and boots the installed disk. type_keys now types a full US layout and Ctrl-U, which clears the answer systemd's prompts preselect. The documented block drops the /dev/sdX placeholder so sysinstall asks for the disk; the docs say how to name it instead. Add DOGFOOD_FIRMWARE=foreign-keys to scripts/dogfood-diskless.sh: on Fedora's OVMF_VARS.secboot.fd (vendor keys enrolled, not the Bluefin db) the firmware must refuse the netboot ESP's loader before systemd-boot or the kernel runs. install-qemu-ovmf.sh exports it as OVMF_VARS_FOREIGN; the preflight checks it and openssl. Full installs on such firmware stay out of scope until shim is Microsoft-signed. Both run in the boot test: the firmware check in the diskless bucket, the console install in the installer bucket, which now also downloads the netboot part of the image set. Closes projectbluefin#450 Assisted-by: claude-opus-5-5 via omp Hive-Run: projectbluefin#450 Hive-Plan: approved-direction (jeefy 11-03 recommendation, approved by Danathar) Hive-Spec: projectbluefin#450#diskless-console-entry Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Needs approval from an approver in each of these files:Approvers can indicate their approval by writing |
dbcb244
|
There was a problem hiding this comment.
HUMAN DECISION NEEDED — @Karibhou: a maintainer must authorize this contributor's workflow execution to obtain native boot evidence.
Summary: These checks exercise installation from a computer started over the network and rejection when its firmware does not trust Bluefin. I found no concrete defect after reading the surrounding boot, credential and console code. The new paths still need a real virtual-machine run before their behavior is established.
What I need from you: Have a maintainer authorize the build and retain successful results for both new boot scenarios.
Reviewed dbcb244689a0a76b92ab0a0453de5c572d841728.
Review limit: The interactive sequence at scripts/dogfood-installer.sh:878-914 and firmware refusal at scripts/dogfood-diskless.sh:327-357 remain unverified in native QEMU/KVM. The focused unit tests pass, but the keyboard and wrapped-question tests use stand-ins (tests/unit/test_dogfood_installer.py:151-177,191-205). This environment has neither QEMU nor /dev/kvm; the matching-head build run concluded action_required, not a boot result. Correctness remains requires_human pending authorization and native evidence.
The PR body now explicitly leaves the remaining work in the installer investigation (#450) open; that broader work is not a blocker for this partial contribution.
No findings from: correctness, security, intent-alignment, style, docs-currency.
Confidence: 3/5 (needs attention) — 1 perspective requires a human decision
— hive: agent=reviewer backend=copilot model=gpt-6.1-sol copilot=1.0.88
|
Sentinel reviewed at
Removing |
|
Addressed review: replaced |
|
Needs a decision, not a merge: the hive's GitHub App is not permitted to rerun shared ci (GitHub answered 403 Resource not accessible by integration); the Clear the cause and the hive re-evaluates on its next pass; the stage moves to Updated 2026-11-18 02:44 UTC. |
|
@Karibhou this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (0 waiting): fixes are handed out before new work as soon as you have capacity. |
|
@Karibhou the hive has adopted this PR ( |
|
Summary: An automated security check (zizmor) fails on many open pull requests in this repository at once, so the cause is shared, not this change. It is tracked in one place (#651); this PR is deferred until that is fixed. Baseline triage: DEFER_TO_INCIDENT (sibling PRs red on same check). See #651. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-sonnet-5.5 copilot=1.0.88 |
|
The hive adopted this PR ( Blocker: the review swarm asked for a human decision. The hive would move this to |
|
Thanks for reviewing. The requested native boot evidence is still unavailable for head |
|
The cancelled |
|
The hive adopted this PR ( Blocker: the review swarm asked for a human decision. The hive would move this to |
|
The hive adopted this PR ( Blocker: the review swarm asked for a human decision. The hive would move this to |
|
The hive's GitHub App lacks |
jeefy
left a comment
There was a problem hiding this comment.
Verdict: COMMENT. I found no secret leak, no hardcoded internal host or IP, and no definite correctness bug in the diff. I am not approving: nothing here has booted, so it needs maintainer boot evidence first. Reviewed at dbcb244, from the diff, the checked-out PR scripts and the CI logs.
Password handling and temp secrets
scripts/dogfood-installer.sh:863-866: the password is 12 random bytes from/dev/urandom, masked with::add-mask::on Actions. It is hashed withopenssl passwd -6 -stdin, so the plain text never reaches argv, and the hash file is written underumask 077. Good.scripts/dogfood-installer.sh:872: only the hash goes to the guest, through the existingcred().- The hash file is not named
*.log, so it is not matched bybuild.yml'sdist/dogfood-installer-*/*.logupload.tests/unit/test_ci_boot_test.pylists it,import.pull,decoy.rawandtarget.rawas private. scripts/dogfood-installer.sh:886types the password only afterwait_prompt 'Password:$', so it is not echoed intoscreen.log.- Nit:
scripts/dogfood-installer.sh:255-258:cleanup()kills QEMU and the HTTP server but leavesdiskless-root.hash,import.pulland the 8Gdecoy.rawin${state}. This is harmless on an ephemeral runner. For local runs, arm -fof the hash incleanup()would be tidier. - Nit:
scripts/dogfood-installer.sh:507(type_keys) and:872(cred()) expose the plain text and the base64 hash in argv. The plain text is already exposed that way at:1166-1205, and the hash on its own is not crackable from 96 bits of entropy. I would not block on it.
Hardcoded hosts and secrets
10.0.2.2is QEMU's user-net gateway, the same as indogfood-diskless.sh. The listener binds127.0.0.1. There are no internal hostnames and no keys in the diff.
ESP enrollment path
scripts/dogfood-installer.sh:309-316, 605-611: step 1 enrolls from the netboot ESP, which carriessecure-boot-enroll if-safe(elements/oci/bluefin-server-image.bst:227). It uses the samesuccessfully enrolledgate as the stick path. The ESP is attached withsnapshot=on, so the artifact stays untouched. The enrolled store is then reused for the diskless boot at:878. This looks right.- I checked the pinned RPM:
OVMF_VARS.secboot.fdis a regular 128 KiB file (not a symlink), sobsdtarextraction inscripts/ci/install-qemu-ovmf.sh:32will work.
Does the foreign-keys test prove that unknown keys refuse to start the server?
Mostly yes, with two caveats:
scripts/dogfood-diskless.sh:115requires a positiveBdsDxe: failed to load Boot#### ...: Access Denied|Security Violationline, andprobe_doneis checked first (:315), so a node that boots fails the test.:79-83rejects combinations that would make it meaningless.- The negative check at
:345(successfully enrolled|Secure boot enabled) is close to vacuous.stop()returns at the first refusal line, so the log is read before anything later could run. It is a belt-and-braces check, not the evidence. The positive regex is what carries the test. - There is no positive control in this scenario.
Access Deniedwould also come from a corrupt or unsigned ESP, and nothing shows that the same ESP boots under the Bluefin db. The sibling diskless scenarios cover that, and the PR body says as much. - Per the PR body and
docs/skills/ddi-installer.md, the test encodes "shim is not yet Microsoft-signed". When shim is, this scenario must change. The comment atboot-test.sh:59could say so. - The message text is read from edk2 source, not observed. It is the main thing a real run has to confirm.
Console install test
diskless_install_commandreads the documented block, and the unit test checks that it names no disk. This is a good doc-drift guard.- Everything about sysinstall's prompts (
:891-912), theby-idnames in the disk list (:891,:897) and the summary fitting on one 25-row screen (:905-908) is unverified. The summary check reads only the last screen snapshot. If the summary scrolls off, the test fails closed with "summary lacks ...", which is acceptable but would be confusing. - 4096 MiB (
DOGFOOD_MEM) with the whole DDI pulled into RAM plus an install is the same sizing as the diskless runs. Check it in the first real run.
CI status (fork PR)
- zizmor (run 42635674359, 2026-11-11,
dbcb244): the only output is warnings,action's hash pin has mismatched or missing version commentatbuild.yml:142,182,222,297,reproducibility.yml:64,track-junctions.yml:45andunit-tests.yml:45. All aretaiki-e/install-action@3a3daaf... # v2, whose floatingv2tag has moved. None of these files or lines are touched by the PR. The branch is 23 commits behindmain, andmainnow pinstaiki-e/install-action@ab49d3c... # v2.90.5; recentmainLint workflows runs are green. A rebase should clear it. This is staleness, not this change. - build (run 43601216323,
buildjob, step "Build and export the image set"): cancelled at 5h00m. The log shows a cold BuildStream build with no cache hits, with nothing after 14:35 until the 300-minute timeout (build.yml:281) hit at 18:44 UTC.boot-test,image-checkandrelease-dry-runwere skipped. This is a fork PR without cache access, not a defect in the diff. Result: no boot evidence exists for either new scenario. changes,validate,unit,docsandactionlintare green.
Needed before merge
- Rebase on
mainto clear zizmor. - A maintainer runs the boot test with cache access (for example from an in-repo branch), then confirms from the logs that both new scenarios pass. That covers sysinstall's prompt strings, the OVMF
Access Deniedline and the device names.
|
The hive will not publish head Ask: a maintainer pushes the fix to this PR's branch and merges it, or cherry-picks the change onto a maintainer-owned branch. The hive would move this to |
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-buildlabel 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-consoleinscripts/dogfood-installer.sh)import.pull), with the target disk and a second disk attached.passwd.hashed-password.rootthrough the existingcred()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.sendkeyand the existing virtio tty1 mirror.docs/skills/ddi-installer.md, read from the doc at run time, so the doc and the test cannot drift apart.systemd-sysinstall(v261 prompt strings): the target by its number in the disk list,erase, firmware registrationyes, thenyesat the summary. Before checking for "Installation succeeded.", it checks that the summary showsSelected Disk: <target>,Erase Disk: yesandRegister in Firmware: yes. Then it powers off._emptyslot B yet) and that the second disk still has no partition table or filesystem.check_disk_boot/check_issuechecks as the unattended path.Supporting changes:
type_keysnow covers the full US layout (shifted symbols and capitals) plus Ctrl-U, which clears the answer systemd'sask_string_fullfills in ahead of time. The disk prompt prefills the disks' common/dev/disk/by-prefix, and the registration prompt prefillsyes. An unmapped character now fails before any key is sent.wait_questionmatches a question in the newest screen snapshot with all whitespace removed, because sysinstall's keep/erase question (about 125 columns) wraps on the console./dev/sdXplaceholder, 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-keysinscripts/dogfood-diskless.sh)OVMF_VARS.secboot.fd(already in user mode, vendor keys enrolled, no Bluefin db).install-qemu-ovmf.shextracts it from the same pinned RPM and exports it asOVMF_VARS_FOREIGN. I checked the pinned RPM's header and the file is listed there.ovmf_vars_foreignindogfood-firmware.shalso looks in the Debian/Ubuntu*.ms.fdpaths.BdsDxe: failed to load Boot#### ...: Access Denied(orSecurity Violation). It fails ifsuccessfully enrolledorSecure boot enabledappear, 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 thedisklessbucket, and the console install goes in theinstallerbucket, 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: theinstallerbucket now downloadsimage-set-{core,netboot,installer}.opensslandOVMF_VARS_FOREIGN.opensslis added to the apt install.ci-tooling.mddescribes both scenarios (reflowed to stay within its 500-line limit), and the shim section ofddi-installer.mdpoints 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 cleanupstream/maincheckout on this machine exactly. They come from Python 3.11 (PurePosixPath.full_match,test_track_binaries.py) and the local shellcheck 0.9.0.sendkeyand reads back as the same textwait_questionfinds a question split across 40-column lines and ignores one that is no longer on screendiskless-consoleovmf_vars_foreignlookup and preflightpython3 .github/scripts/docs-checks.pypasses.qemu-system-x86_64(no KVM on this machine):DOGFOOD_BOOT=httpcombined with it → refused.sysinstall.c/prompt-util.c/terminal-util.c), OVMF's message (PlatformBmPrintScLibwithDENY_EXECUTE_ON_SECURITY_VIOLATION), and the device names in the disk list. Afull-buildrun 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