Skip to content

feat(blueshell): add Blueshell, container-native terminal (org.tunaos.blueshell) - #717

Merged
jing2uo merged 7 commits into
flatpark:mainfrom
hanthor:add/org.tunaos.blueshell
Oct 18, 2026
Merged

jing2uo merged 7 commits into
flatpark:mainfrom
hanthor:add/org.tunaos.blueshell

Conversation

@hanthor

@hanthor hanthor commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Supersedes #714: the head branch was renamed to the lowercase app id and GitHub auto-closed #714 on the rename. The review thread, provenance checks, and approval there all stand; the diff since jing2uo's review is listed at the bottom. No re-review of provenance intended.

What

Blueshell (org.tunaos.blueshell): Ghostty's rendering engine with a Ptyxis-style terminal UI and first-class Toolbox/Distrobox/Podman container support, from tuna-os. Submitted and maintained by its developer (tuna-os), same as org.tunaos.tavern (#677) and org.tunaos.compass (#678).

Branding: Blueshell display name, org.tunaos.blueshell app id — never BlueShell.

Packaging

  • Download: the vendor's prebuilt /app-tree tarballs from the GitHub release (blueshell-<arch>.tar.gz, x86_64 + aarch64), pinned by sha256+size. Same tree the vendor's .flatpak bundle and OCI image ship.
  • Runtime: org.gnome.Platform 51. The tarball carries the two libraries the runtime lacks (gtk4-layer-shell, libghostty-vt) on LD_LIBRARY_PATH; GHOSTTY_RESOURCES_DIR set. No patches, no rebuild.
  • /usr/bin/flatpak run org.tunaos.blueshell --version prints Ghostty 1.3.1….

Sandbox

  • Granted: --talk-name=org.freedesktop.Flatpak (declared escape — host shells and container entry are the app), --filesystem=home:ro (host ghostty config), --filesystem=xdg-run/podman (container picker). No network; vendor's --device=all dropped (dri covers rendering).
  • Dropped since feat(blueshell): add BlueShell, container-native terminal (org.tunaos.BlueShell) #714: --own-name/--talk-name=com.mitchellh.ghostty — unneeded, --class registers org.tunaos.blueshell (verified below).

Tested

  • read-descriptor.mjs + audit-descriptor.mjs: pass (declared escape WARN only).
  • check-apply-extra.sh: pass as root with no capabilities. NOTE: it still asserts the old-cased vendor desktop filename because the pinned v1.3.1 tarballs ship it; the next vendor release must update that assertion.
  • publish.sh --verify: EXIT 0, installed from local signed repo OK.
  • GUI (headless sway, x86_64): window draws, app_id org.tunaos.blueshell = StartupWMClass; host shell opens; shell integration injected (no FileNotFound warning); TERMINFO resolves, infocmp xterm-ghostty OK; second launch opens its own window; container menu built (12 cached, not entered); home-folder diff clean.
  • aarch64: pin matches, not executed here. Native Wayland session + entering a container: not tested.

Flathub

Not on Flathub. Ghostty upstream does not publish there.

Changes since the #714 review

  • /app/share symlinks for shell-integration + terminfo; --class=org.tunaos.blueshell in the wrapper; ghostty bus names dropped.
  • App id lowercased to org.tunaos.blueshell, display name Blueshell (menu label _About Blueshell in tuna-os/blueshell).

….BlueShell)

Repackages the vendor's prebuilt /app-tree tarball from the v1.3.1
release (extra-data, x86_64). Ghostty engine with Ptyxis terminal UI;
host shells and container sessions spawn through flatpak-spawn
(declared in policy.dangerous_permissions).
…bus names

Shell integration and terminfo resolve at the paths Ghostty hands host
shells via relative /app/share symlinks; --class aligns WM_CLASS/app_id
with StartupWMClass; --own/talk com.mitchellh.ghostty proven unneeded
since --class registers org.tunaos.BlueShell and multi-window launch works.
Display name Blueshell everywhere user-visible; technical surfaces
(manifest id, desktop Icon/StartupWMClass, metainfo id/launchable,
wrapper --class) use the lowercase id. apply_extra keeps asserting the
old-cased desktop filename because the pinned v1.3.1 vendor tarball
still ships it; the next vendor release must update that assertion.
@jing2uo

jing2uo commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Review: approved (static review per docs/reviewers/review-runbook.md, plus a local test run on our machine)

Thanks, James. This is the #714 package with all three fixes from our local test applied and the app id lowercased. The provenance review on #714 still holds, because the pinned bytes have not changed. We also built and ran it locally again, and all three issues are fixed. Every check is listed below.

Local test

x86_64, Debian sid host, rootful Xwayland :99. Built and installed from a local signed repo with publish.sh --verify (exit 0), launched with --socket=x11.

Issue from #714 Result Evidence
Shell integration not injected ✅ fixed Log: found Ghostty resources dir: …/org.tunaos.blueshell/x86_64/stable/<commit>/files/share/ghostty then shell integration automatically injected shell=.zsh. No FileNotFound warning. In the host shell, GHOSTTY_SHELL_FEATURES=cursor:blink,path,title and ls -d $GHOSTTY_RESOURCES_DIR/shell-integration resolves
TERMINFO missing on the host ✅ fixed In the host shell, TERM=xterm-ghostty, TERMINFO=…/files/share/terminfo, and infocmp xterm-ghostty reads …/files/share/terminfo/x/xterm-ghostty
WM_CLASS was com.mitchellh.ghostty ✅ fixed XGetClassHint on every window: ghostty, org.tunaos.blueshell, which equals StartupWMClass

Also checked: the window draws (titlebar, tab button, menu), the default shell is resolved from the host passwd (/bin/zsh) and started via flatpak-spawn, the ptyxis-agent connects and the container menu lists the host's 3 containers (not entered), and a second launch opens its own process and window. After the run, $HOME had no new entries outside ~/.var/app/org.tunaos.blueshell.

Verdict: PASS. Nothing triggers a hard fail. The one item that needs a maintainer's decision, the org.freedesktop.Flatpak escape, was approved on #714. We'll merge once CI is green on the last two commits (3e150477, 078d699d), which still need a maintainer to approve the workflow run.

Checks

Legend: ✅ pass · ⚠️ warn · 👤 maintainer decision · ➖ not applicable

# Phase Check Verdict Evidence
0 Safety Static review, artifacts isolated ✅ For the static checks, both tarballs were downloaded as bytes into a temp dir and listed with bsdtar -tvf, not extracted, and resolve-update.sh was read, not run. The repo's own read-descriptor.mjs / audit-descriptor.mjs ran against the PR head in a throwaway worktree. The local test above ran separately, as a tester, after the static review
1.1 Scope Classification ✅ New app registry/org.tunaos.blueshell/ (8 files) plus one row in docs/reference/upstream-approvals.md
1.2 Scope High-scrutiny surface ✅ No .github/, scripts/, config/ or signing changes. resolve-update.sh is in a brand-new app dir, which is the normal flow
2.1 Provenance Submitter ✅ hanthor: account created 2013-11-02, 164 public repos, 94 followers. Compass (#678) already merged here
2.2 Provenance Source repo ✅ tuna-os/blueshell: created 2026-06-05, not a GitHub fork. The project describes itself as a Ghostty derivative
2.3 Provenance Commit identity ✅ All 7 commits authored by [email protected]
2.4 Provenance Timeline ✅ Release v1.3.1 published 2026-10-14T03:20Z by hanthor. The .tar.gz assets were added 2026-10-17T17:59Z, next to the .flatpak bundles from 10-14
2.5 Provenance Trust tier ✅ Established. The developer submits their own app
2.6 Provenance Artifact tier ✅ Tier 1, open source (MIT AND GPL-3.0-or-later)
3.1 Manifest Source types ✅ Two extra-data sources (x86_64, aarch64), each with sha256 and a non-zero size. Five file sources, all in this PR. No git or archive
3.1b Manifest Remote bytes in /app ✅ None. The payload arrives as extra-data at install time. build-commands only install in-repo files and add two symlinks
3.2 Manifest finish-args 👤 → ✅ --talk-name=org.freedesktop.Flatpak is declared in policy.dangerous_permissions with a justification (a terminal runs host shells and enters containers), approved on #714. --filesystem=home:ro (reads ~/.config/ghostty and its includes) and --filesystem=xdg-run/podman (container picker) are justified in manifest comments. No --share=network. The vendor's --device=all was dropped in favour of --device=dri
3.3 Manifest policy: block ✅ proprietary: false is correct. dangerous_permissions covers the only high-risk grant in use
3.4 Manifest build-commands ✅ 5× install -D… (apply_extra, wrapper, desktop, metainfo, svg) plus ln -s ../extra/blueshell/share/{ghostty,terminfo} /app/share/…. No network, no sed, no patching or recompiling. The symlinks point at the unmodified payload
3.4b Manifest packaging: declaration ✅ kind: host-command with accurate en and zh-Hans text. audit-descriptor.mjs prints only WARN: sandbox-escape permission --talk-name=org.freedesktop.Flatpak (declared in policy.dangerous_permissions)
3.5 Manifest Source URLs genuine ✅ https://github.com/tuna-os/blueshell/releases/download/v1.3.1/blueshell-{x86_64,aarch64}.tar.gz
3.6 Manifest App id ✅ org.tunaos.blueshell belongs to the TunaOS project (tunaos.org), and the developer's own flatpak/org.tunaos.blueshell.* files use the same id
3.7 Manifest update.command ✅ ./resolve-update.sh
3.8 Manifest Download host ✅ The project's own GitHub releases, not a personal mirror
3.9 Manifest Optional permissions not pre-granted ✅ Every grant serves the core feature. No optional broad grant to move into a flatpak override note
3.10 Manifest Test record ✅ The PR body records publish.sh --verify, a headless sway GUI run (window, app_id = StartupWMClass, host shell, shell integration, infocmp xterm-ghostty, second window, container menu, home diff). aarch64 execution, a native Wayland session and entering a container are marked untested. We ran x86_64 ourselves on #714 and again on this PR (see Local test)
4.1 Runtime No fetch-and-exec ✅ None in the manifest, wrapper or apply_extra.sh. The app has no network permission
4.2 Runtime Resolver read as code ✅ resolve-update.sh makes one curl to api.github.com/repos/tuna-os/blueshell/releases/latest (optional GITHUB_TOKEN header) and uses jq to pick anchored asset names ^blueshell-(x86_64|aarch64)\.tar\.gz$, exactly one each. It fails if either arch is missing and emits only JSON. No eval, no writes
4.3 Runtime Network × filesystem ✅ No network. home:ro is read-only
5.1 Artifact sha256 = pin ✅ x86_64 bc2ce22b53486a619a95e07546ff51e6d2e1f59de3c8a95be269ef067867120d, 20930820 B. aarch64 08687513d29f820639ac279c8c21f7b354c060071236994d18c219dbd0debf78, 20525111 B. Both equal the manifest pins and GitHub's asset digest
5.2 Artifact Archive listing ✅ 941 entries per arch. No absolute paths, no .. entries, no setuid/setgid bits. 36 symlinks: 34 under share/locale/ point to ../../share/runtime/locale/… inside the tree (they dangle, which is harmless), 2 in lib/ point to sibling .so files. Hardlinks stay inside the tree (icons, themes, terminfo)
5.3 Artifact Nothing injected (Tier 1) ✅ The wrapper sets GHOSTTY_RESOURCES_DIR and puts the payload's own lib/ on LD_LIBRARY_PATH (gtk4-layer-shell, libghostty-vt), then execs the vendor's bin/ghostty with --gtk-single-instance=false --class=org.tunaos.blueshell. No LD_PRELOAD, no payload file is replaced
5.4 Artifact Shipped = official ✅ The pins are byte-identical to the ones on #714, which we matched to the CI artifacts of your Publish Flatpak run. apply_extra.sh only unpacks with bsdtar --no-same-owner, checks four expected paths and deletes the tarball
5.5 Artifact Bundled third-party runtimes ➖ None. The two extra libraries are built by your own CI
5.6 Artifact IOC scan ✅ The same bytes passed the #714 scan (persistence, miner, reverse shell, hardcoded IPs, embedded ELF, RPATH). The listing shows no autostart, systemd or cron entries
6.1 Compliance Purpose ✅ Terminal emulator. Ghostty's MIT licence permits a derivative, and the Ghostty name appears only as "powered by Ghostty"
6.2 Compliance Non-FOSS not a reason ➖ Open source
7.1 Verdict Overall PASS
7.2 Verdict Hard-fail triggers — None

Files read

  • org.tunaos.blueshell.yml: runtime GNOME 51, finish-args as above, one module, managed extra-data block, five file sources.
  • flatpark.yml: id, name Blueshell, website https://tunaos.org/blueshell (returns 200), arches x86_64 + aarch64, upstream_approved: true, policy, packaging.
  • apply_extra.sh: unpack, four existence checks, cleanup. Nothing from the payload is executed.
  • blueshell-wrapper: covered in 5.3.
  • org.tunaos.blueshell.desktop: Exec=blueshell, StartupWMClass=org.tunaos.blueshell, X-TerminalArg* keys for xdg-terminal-exec.
  • org.tunaos.blueshell.metainfo.xml: id, licences, launchable, release 1.3.1 dated 2026-10-14 (matches the GitHub release).
  • org.tunaos.blueshell.svg: original artwork. The last commit only adds a group transform.
  • resolve-update.sh: covered in 4.2.
  • docs/reference/upstream-approvals.md: one row, approved by construction.

Changes since #714

0422e532 adds the share symlinks and --class and drops the ghostty bus names. c130193e renames the id. 3e150477 changes the icon only. 078d699d changes website: only. The PR merges cleanly onto main.

Notes (not blocking)

  1. apply_extra.sh still checks for share/applications/org.tunaos.BlueShell.desktop, which is what the v1.3.1 tarballs contain. When a release ships the lowercase file, that check fails and the update bump fails its unpack check, so please change it in the same release.
  2. The v1.3.1 .flatpak bundles on your release page still use org.tunaos.BlueShell. Anyone who installed one will get FlatPark's build as a separate app.
  3. The metainfo homepage points to GitHub while website: points to tunaos.org/blueshell. Either is fine.

What this review does not cover

  • It does not audit Blueshell's or Ghostty's source code (Tier 1 means the IOC scan of what ships, plus provenance).
  • The aarch64 build was hash-checked and listed but not run by anyone.
  • Native Wayland sessions and entering a container from the picker were not tested by you or us. Our local run used X11 on :99.
  • check-apply-extra.sh (system install as root without capabilities) was not run again here. Your PR body records a pass, and the pinned bytes and apply_extra.sh logic are the same as on feat(blueshell): add BlueShell, container-native terminal (org.tunaos.BlueShell) #714, where it passed for us.

Reproduce

for a in x86_64 aarch64; do
  curl -fsSLO https://github.com/tuna-os/blueshell/releases/download/v1.3.1/blueshell-$a.tar.gz
done
sha256sum blueshell-*.tar.gz; stat -c '%n %s' blueshell-*.tar.gz
bsdtar -tvf blueshell-x86_64.tar.gz | awk '$1 ~ /[sStT]/'            # setuid/setgid: none
bsdtar -tvf blueshell-x86_64.tar.gz | grep ' -> ' | grep -v share/locale/
gh api repos/tuna-os/blueshell/releases/tags/v1.3.1 --jq '.assets[]|{name,size,digest}'
node scripts/audit-descriptor.mjs registry/org.tunaos.blueshell/flatpark.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants