Skip to content

fix: verify SHA-256 on bootc-installer bundle in iso/live/src/install-flatpaks.sh, drop tuna-os fallback - #48

Merged
hanthor merged 2 commits into
mainfrom
sec/fix-utah-installer-sha
Sep 18, 2026
Merged

hanthor merged 2 commits into
mainfrom
sec/fix-utah-installer-sha

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Security Fix

Cluster: iso/live/src/install-flatpaks.sh only (live-ISO flatpak bake-in). Disjoint from open PRs utah#40/#44 (scripts/flavors.py / flavor matrix).

install-flatpaks.sh downloaded org.bootcinstaller.Installer.flatpak at a pinned version but verified nothing before flatpak build-import-bundle with a --no-gpg-verify remote. On download failure it fell back to the same version tag in tuna-os/tuna-installer, a different GitHub org — a substitution path into every Utah live ISO.

This PR:

  • pins INSTALLER_SHA256 (v3.0.16 bundle, digest computed from the upstream release asset) beside INSTALLER_VERSION, mirroring the UUPD_SHA256 pattern in the Containerfile
  • verifies the bundle with sha256sum --check --strict before import
  • removes the cross-org FALLBACK_REPO fallback

Follow-up (not in this PR): extend scripts/check-download-integrity.py to resolve simple ${VAR} indirection so extension-hidden downloads cannot evade the guard — tracked in #47.

Fixes #47


Filed by sec-check agent (ACMM L4/L5 — hold-gated mode). Hold-gated: human review required.

— hive: agent=sec-check backend=copilot model=kimi-k3

…-org fallback

The ISO live build downloads org.bootcinstaller.Installer.flatpak at a
pinned version and imports it with --no-gpg-verify, so nothing verified
the payload. It also fell back to fetching the same version tag from
tuna-os/tuna-installer, a different GitHub org, letting a release there
substitute the installer shipped in every Utah ISO.

Pin INSTALLER_SHA256 beside INSTALLER_VERSION (same pattern as
UUPD_SHA256 in the Containerfile), verify the bundle with
sha256sum --check before build-import-bundle, and remove the cross-org
fallback so the download only ever comes from
projectbluefin/bootc-installer.

Fixes #47

Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 6, 2026

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Digest verified correct against the real release asset

I downloaded the actual bundle and checked the pin in this PR:

$ curl -sSL -o bi.flatpak \
    https://github.com/projectbluefin/bootc-installer/releases/download/v3.0.16/org.bootcinstaller.Installer.flatpak
$ ls -l bi.flatpak
-rw-r--r-- 1 root root 92530152 bi.flatpak
$ sha256sum bi.flatpak
6d68445965bf03fd628fcc9e856b162939b5f87bf4532f62725cf0e114c7eea7  bi.flatpak

Matches INSTALLER_SHA256 exactly. The v3.0.16 tag exists in that repo and nowhere else relevant:

$ git ls-remote --tags https://github.com/projectbluefin/bootc-installer | grep -v '\^{}' \
    | sed 's#.*refs/tags/##' | sort -V | tail -3
v3.0.13 v3.0.14 v3.0.16

The security argument is sound too. flatpak build-import-bundle on a --no-gpg-verify remote means the version pin was the entire trust story, and the tuna-os/tuna-installer fallback on the same version tag in a different org was a real substitution path into every Utah live ISO. Removing it and verifying the digest before import is the right shape, and mirroring the existing UUPD_SHA256 pattern keeps it consistent with how the Containerfile already does this.

The patch applies cleanly to current main (git apply --check clean), even though the PR is based on the older e993c550.

One conflict to resolve before this merges

#65 touches the same six lines and goes the opposite direction. It repoints INSTALLER_REPO from projectbluefin/bootc-installer to tuna-os/bootc-installer and removes the fallback, but adds no digest check. That target does not publish v3.0.16:

$ curl -sSo /dev/null -w "%{http_code}\n" -L \
    https://github.com/tuna-os/bootc-installer/releases/download/v3.0.16/org.bootcinstaller.Installer.flatpak
404

so #65 as written breaks just iso outright. I've flagged that there. Both PRs agree the cross-org fallback must go, which is the substance of #50/#47; they disagree on which org is canonical. This PR's direction is the one supported by what is actually published.

Follow-ups

The check-download-integrity.py ${VAR} indirection gap tracked in #47 is the right follow-up and correctly scoped out. Worth noting it is load-bearing: that guard is exactly what should have caught #65's 404, and it could not, because it cannot resolve ${INSTALLER_REPO} / ${INSTALLER_VERSION}. Might be worth bumping its priority.

Also note this PR carries the hold label and is red on Build Utah — but that red is the pre-existing /usr/local/libexec breakage on main (see #55/#56), several steps before the ISO path, not anything from this change. iso/live/src/install-flatpaks.sh runs during just iso, which Build Utah does not invoke at all, so CI here cannot exercise this change either way. The digest verification above is the strongest available evidence and it checks out.

This one looks ready to me once #65's direction is settled and the hold is cleared.


Generated by Claude Code

Danathar added a commit to Danathar/utah that referenced this pull request Sep 12, 2026
…rojectbluefin#48

Review on projectbluefin#65 found that tuna-os/bootc-installer does not publish the
pinned v3.0.16 release (it tops out at v3.0.14 on semver tags), so
repointing INSTALLER_REPO there while keeping the v3.0.16 pin breaks
`just iso`: the curl 404s and, with the fallback removed, nothing
catches it under set -euo pipefail. Verified v3.0.16 is only served
from projectbluefin/bootc-installer.

projectbluefin#48 already carries the fallback removal plus a sha256sum digest pin
verified against the real published asset, so this PR reduces to its
docs/Justfile clarifications and keeps INSTALLER_REPO pointed at
projectbluefin/bootc-installer with a comment recording why.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LNgJ8VMdoqzGequbxsP2Kc
Danathar added a commit to Danathar/utah that referenced this pull request Sep 14, 2026
…ifact

Review on projectbluefin#65 established that repointing at tuna-os/bootc-installer while
keeping the v3.0.16 pin breaks the ISO build -- that tag exists only in
projectbluefin/bootc-installer, and `curl --fail` aborts the script under
set -euo pipefail. f4964ec reverted the repoint in response.

The comment that commit left behind is accurate but incomplete, and the
missing half is the part that matters for whoever resolves projectbluefin#50: it reads as
"tuna-os does not publish this", when in fact tuna-os publishes the same
org.bootcinstaller.Installer.flatpak asset -- just under date-based tags
rather than semver. Verified both directions:

  v3.0.16                 projectbluefin 200, tuna-os 404
  v2026.09.14-9a9a913     tuna-os 200
  v2026.09.08-2684a1d     tuna-os 200
  v3.0.14 (tuna-os)       404

So the repoint projectbluefin#50 asks for is achievable; it is a versioning-scheme change
(INSTALLER_REPO and INSTALLER_VERSION have to move together), not a blocked
one. Left as a comment rather than acted on because projectbluefin#48 is open against these
same lines proposing the opposite direction, and which org is canonical is
the open question in projectbluefin#50.

Refs projectbluefin#50

Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot changed the title [sec-check] fix: verify SHA-256 on bootc-installer bundle in iso/live/src/install-flatpaks.sh, drop tuna-os fallback fix: verify SHA-256 on bootc-installer bundle in iso/live/src/install-flatpaks.sh, drop tuna-os fallback Sep 17, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

CI note: the failing contract check fails only at just check-parity — packages/bluefin.toml has drifted from live projectbluefin/bluefin (firefox moved to dx, libgda/libgda-sqlite and ppp dropped upstream). This is repo-wide drift unrelated to this PR's change (SHA-256 verification in iso/live/src/install-flatpaks.sh) and is already owned by open PR #110, which restores bluefin.toml parity. Once #110 lands, a rebase/rerun here should go green. Not duplicating that fix in this PR.

🐝 Hive Agent: security | Instance: hosted-projectbluefin-knuckle-gjvq | SHA: unknown

— hive: agent=sec-check backend=copilot model=claude-fable-5

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the pin rather than trusting it: fetched https://github.com/projectbluefin/bootc-installer/releases/download/v3.0.16/org.bootcinstaller.Installer.flatpak and it hashes to 6d68445965bf03fd628fcc9e856b162939b5f87bf4532f62725cf0e114c7eea7, the value this PR commits. Dropping the tuna-os fallback is right for the reason given — a same-named tag in another org must not be able to substitute the installer. Merges clean on today's main.


Generated by Claude Code

@hanthor
hanthor merged commit a851627 into main Sep 18, 2026
4 of 5 checks passed
@hanthor
hanthor deleted the sec/fix-utah-installer-sha branch September 18, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/scanner Filed or owned by the scanner agent. hold Indicates that a PR should not merge because someone has issued a /hold command.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sec-check] iso/live/src/install-flatpaks.sh installs bootc-installer bundle with no digest/signature check; falls back to a different org's release

1 participant