Commit Graph
27 Commits
Author SHA1 Message Date
Audiobuzz ca6b75508c ci: pin Go-build step to bash (Gitea runner defaults run steps to sh)
The out-of-VM Go build step used `set -euo pipefail`, but the self-hosted
Gitea/act runner runs `run:` steps under sh (dash), which rejects
`-o pipefail` ("Illegal option"). Add `shell: bash` to the step. Keeping
`set -e` is load-bearing: without it a failed go build/test in the first
subshell group is masked by the trailing `file` command's success, letting
a broken binary reach the Packer build.
2026-07-02 10:07:23 +00:00
Audiobuzz 6278f2847d tpm-enrol: pivot host enrolment to a Go binary, built out-of-VM
Replaces the shell/openssl-provider host enrolment (a35f2d6) with a static
Go + go-tpm binary, and moves BOTH host Go binaries out of the Packer VM.

fleet-enrol (files/enrol/, Go + go-tpm, no CGO):
  - talks to /dev/tpmrm0 DIRECTLY via transport.FromReadWriter(os.File) — no
    linuxtpm, so go-tpm is the only dep and there is NO tpm2-tools key-gen /
    openssl tpm2 provider / curl in the image (removes the biggest bench risk,
    the provider handle: key-ref).
  - ensures the ECDSA key @0x81010001, builds the CSR (crypto.Signer over the
    TPM key), POSTs CSR+context to the broker, shows the Plymouth fingerprint,
    polls /status, writes the leaf cert to NV 0x01800001.
  - tpmkey/ is an exported package so the TPM ceremony is tested against the
    go-tpm software simulator from a SEPARATE simtest/ module (CGO stays out of
    the shipped build). Transaction logic (mock broker) tested in-package.
  - deps pinned by go.sum (not vendored): the binary now builds on the CI
    runner, which has network — reproducible via pinned Go 1.26.4 + go.sum.

Out-of-VM build (decision): both fleet-enrol AND fleet-hostapi compile in the
CI "Build host Go binaries" step (Go 1.26.4, CGO off, -trimpath) and Packer
FILE-PROVISIONS the static binaries in. Dropped the in-VM `dnf install golang`
+ the 2d removal — the Rocky build image carries no Go toolchain / go-tpm tree.

Wiring:
  - tpm-enrol.sh: now a thin GATE (empty-NV check, pre-auth DHCP on en*,
    exec /usr/sbin/fleet-enrol, reboot-to-converge). module-setup.sh bundles the
    binary (asserted) + reverts the tpm2-openssl/curl installs.
  - diskless.pkr.hcl: file provisioners for both binaries; enrol installed to
    /usr/sbin before the initramfs build + fapolicyd-trusted; lsinitrd asserts
    fleet-enrol; dnf reverted to baseline (no tpm2-openssl/curl).
  - gitea-main-ci.yaml: Set up Go + build both binaries + run the simulator
    ceremony test, before packer validate.

TESTED here: transaction unit tests + the full TPM ceremony (key-gen -> persist
-> ECDSA sign -> CSR verify -> chunked NV write -> re-enrol) against the go-tpm
simulator. BENCH-VERIFY (real/swtpm, empty owner auth, pre-auth DHCP, Plymouth,
reboot-converge, prod HTTPS) tracked in docs/TODO.md #11.
2026-07-02 09:55:54 +00:00
Audiobuzz b5163f958e Fix upper case branch name bug 2026-06-28 02:19:36 +00:00
Audiobuzz 184c7859cf exclude non-rootfs files from main gitea workflow 2026-06-26 00:06:49 +00:00
Audiobuzz 1f62e5ab17 Add multi branch handling 2026-06-21 09:18:22 +00:00
Audiobuzz 3226a44d5a Refactor dnsmasq to build as a container. Add signed iPXE image build 2026-06-21 09:11:23 +00:00
Audiobuzz e3978bb210 Add secure boot helper 2026-06-20 06:04:04 +00:00
Audiobuzz 1887b6f0a2 Add sbsigntool to the build image 2026-06-20 03:32:56 +00:00
Audiobuzz ec92417312 Initial Secure boot setup 2026-06-20 00:40:59 +00:00
Audiobuzz 18b47ca5b0 re-enable stig 2026-06-19 04:22:03 +00:00
Audiobuzz 51d2385b21 disable stig for now 2026-06-19 02:45:39 +00:00
Audiobuzz 3b776dd970 Add app 2026-06-18 12:03:45 +00:00
Audiobuzz ada4aa4b18 Add STIG hrdening 2026-06-18 10:00:41 +00:00
Audiobuzz 0fdc7980cc Enable boot splash 2026-06-17 22:21:08 +00:00
Audiobuzz 3ef34745c9 Adding Plymouth 2026-06-17 14:28:27 +00:00
Audiobuzz 55aa517976 Network Manager refactor 2026-06-17 13:40:28 +00:00
Audiobuzz 61088d4e6d Add kiosk 2026-06-16 20:38:26 +00:00
Audiobuzz df27be40f1 Change to a non-root account with ssh key 2026-06-16 11:12:23 +00:00
Audiobuzz 450a989d4e maintain selinux attributes into the erofs build 2026-06-15 21:45:59 +00:00
Audiobuzz 67802e259f Fix pipeline not passing the right variuable 2026-06-14 11:42:00 +00:00
Audiobuzz 62e997297c Add SPDDK build 2026-06-14 05:58:55 +00:00
Audiobuzz b948557cd7 Add systemd-boot-efi to the runner 2026-06-13 07:02:38 +00:00
Audiobuzz 327799a666 Adding packer host tooling 2026-06-13 05:07:49 +00:00
Audiobuzz 3ca351fbb2 Update registry sectre reference 2026-06-12 02:04:27 +00:00
Audiobuzz 389901e58d Update the pipeline 2026-06-12 02:02:58 +00:00
Audiobuzz 345bfca02e Bump packer version 2026-06-12 01:57:56 +00:00
Audiobuzz d383655875 Initial commit 2026-06-12 01:46:29 +00:00