Repository navigation
Conversation
… override window The t2linux repository stanza written for Apple T2 Macs sets SigLevel = Never, which disables package authentication entirely for the life of the install: a compromise of the arch-mact2 repository or its delivery path is root code execution through routine pacman transactions. Upstream cannot enforce signatures today -- no package in the repository carries one and the published database signature is stale (it verifies as BAD) -- so flipping to Required would refuse every package and break T2 installs. The stanza now arms verification as far as upstream allows: - the pinned t2linux signing key (8BE1 FEE1 4302 371D EF6F 910A 0E58 77AC 225D 1980) is imported and locally signed, and a failed import refuses to enable the repository instead of falling back to an unauthenticated stanza; - SigLevel = PackageOptional DatabaseNever accepts the unsigned packages shipped today, verifies any package that gains a signature the moment upstream starts signing (rejecting present-but-invalid ones), and skips the stale database signature that a plain Optional would find and reject. A behavioral test drives the script with a mocked lspci and pacman-key: it asserts the stanza is written with the armed policy, that the pinned fingerprint is the only key accepted, that the write is idempotent, and that a failed key import leaves no stanza behind. A tree-wide guard asserts no repository stanza disables verification outright. bin/omarchy-upgrade-to-quattro regenerates the [omarchy] stanza with SigLevel = Optional TrustAll because the keyring package that provides trust arrives through the very repository it authenticates. That override now serves only the keyring bootstrap: require_signed_omarchy_repo runs immediately after install_keyrings and deletes the override line, so every later transaction in the upgrade verifies signatures like a post-omacom#8072 machine. If the keyring failed to install, the override is left in place and the machine keeps working; the upgrade log says so.
There was a problem hiding this comment.
Pull request overview
Hardens package verification for T2 systems and the Quattro upgrade path.
Changes:
- Imports and trusts the pinned T2 signing key.
- Enables optional T2 package-signature verification.
- Removes Quattro’s unsigned bootstrap override after keyring installation.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
install/hardware/pacman.sh |
Arms T2 package verification and imports its signing key. |
bin/omarchy-upgrade-to-quattro |
Restores signed Omarchy repository enforcement after bootstrap. |
test/shell.d/t2-repo-signature-test.sh |
Adds signature-policy and upgrade-ordering checks. |
Suppressed comments (1)
install/hardware/pacman.sh:29
- This guard leaves the vulnerable policy unchanged on existing T2 installations: their config already contains
[arch-mact2], so the key import andSigLevelreplacement are both skipped. Normal updates run migrations (bin/omarchy-update:48), not the hardware installer, and even a manual hardware reapply takes this branch. Add a migration/reconciliation path that imports and locally signs the pinned key before replacing the oldSigLevel = Neverentry.
if ! grep -q '^\[arch-mact2\]' "$t2_pacman_conf"; then
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # - PackageOptional verifies any package that carries a signature the moment | ||
| # upstream starts signing, while still accepting the unsigned packages | ||
| # shipped today. A present-but-invalid signature is rejected, so a later | ||
| # compromise cannot rely on swapping signatures past an already-imported | ||
| # key. |
Copilot review follow-ups: 1. Existing T2 machines already carry [arch-mact2] with SigLevel = Never, and the original guard skipped any config that already had the stanza, so the whole installed base kept the unverified policy. pacman.sh now reconciles in place: when the stanza exists with SigLevel = Never, the pinned key is imported and locally signed and the line is upgraded to the armed policy. A failed import there is non-fatal -- packages are unsigned either way, so the machine keeps working and a later retry can succeed; the fresh-install path still fails closed because an install without its kernel cannot proceed anyway. 2. Normal updates run migrations, not the hardware installer, so a migration (migrations/1787720000.sh) performs the same gated reconciliation for the installed base. Self-detecting and idempotent: it only acts when the stanza exists AND still says Never, and it leaves the machine untouched when the key import fails. 3. The comment on PackageOptional now states exactly what it guarantees: a present-but-invalid signature is rejected, but signature stripping is only excluded once upstream signs consistently and the policy tightens to PackageRequired. Tests extended: legacy-stanza reconciliation (in-place upgrade, no duplicate stanza, key imported and signed), failed-reconciliation non-fatality, migration guards (pinned fingerprint, keyserver, lsign, armed policy, Never-gated mutation).
|
Addressed both review comments in 5b09c4e: 1. Signature-stripping caveat (line 14) — correct. 2. Existing T2 installs skipped by the stanza guard (line 29) — real defect, and the more important of the two: every T2 machine installed before this change already carries
Tests extended to cover both: legacy-stanza reconciliation (in-place upgrade, no duplicate stanza, key imported and signed), reconciliation failure non-fatality, and migration guards (pinned fingerprint, keyserver, lsign, armed policy, Never-gated mutation). Full suite green; |
|
Reviewed at 5b09c4e against What ran, on a disposable Omarchy worker: 1. A T2 install without network now fails ( 2. The reconciliation is not scoped to Smaller: the migration's comment says a failed import can be picked up by "a later migration retry", but How much the T2 half is worth while upstream signs nothing is a call for the maintainer. The upgrader half could stand alone as its own pull request. Second opinion: none. The configured reviewer (Codex Medium) answered its availability check, but omabot's daily review budget was spent, so this review is one model's reasoning (Claude Opus 5.5). Nothing was pushed to the branch: how the fresh-install path should behave when the key cannot be fetched is a design choice, so it is left to you. Waiting on the author for the two fixes above. |
Follow-up to #8072 (Require signed packages from the Omarchy repository). Two repositories in the tree still accept unauthenticated packages as root; this closes what can be closed Omarchy-side and arms the rest.
1.
install/hardware/pacman.sh— the T2 stanza disables verification outrightSigLevel = Nevermeans pacman performs no package authentication at all for the life of the install: any compromise of the arch-mact2 repository, theNoaHimesaka1873account, or GitHub's release delivery path is root code execution on every T2 machine, through routine unattendedpacman -Syutransactions. The repo ships the T2 kernel (linux-t2), firmware, and fan daemon, all executed or loaded at boot.This differs from the #8072 finding in one important way: upstream cannot enforce signatures today. Verified against the live repository:
arch-mact2.dbcarries a%PGPSIG%entry exceptapple-bcm-wifi-firmware;.sigsidecars 404 for every package checked;arch-mact2.db.sigexists but is stale — it verifies as BAD (signed 2022-02-26, key8BE1FEE1 4302 371D EF6F 910A 0E58 77AC 225D 1980, "Noa Himesaka [email protected]") against the current database.So
SigLevel = Requiredwould refuse every T2 package and break the install. The stanza instead arms verification as far as upstream permits:pacman-key --recv-keys … --keyserver keyserver.ubuntu.com, then--lsign-key). A failed import refuses to enable the repository rather than silently continuing unverified — a T2 install without its kernel cannot succeed anyway, and an explicit error beats an unauthenticated stanza.SigLevel = PackageOptional DatabaseNever: unsigned packages shipped today are accepted; any package that gains a signature is verified the moment it appears (a present-but-invalid signature is rejected, so a later compromise cannot strip signatures past an already-imported key); the stale database signature is skipped, which a plainOptionalwould find and reject.Residual risk, stated plainly: until upstream signs its packages, this repository is accepted without authentication and origin compromise is still root on T2 machines. This PR cannot fix that; upstream signing can. Disclosed to [email protected].
2.
bin/omarchy-upgrade-to-quattro— the bootstrap override outlives the keyring installThe upgrader regenerates the
[omarchy]stanza withSigLevel = Optional TrustAllbecause the keyring package that provides trust arrives through the very repository it authenticates. #8072's migration strips that override on the next update pass — but everything the upgrader itself installs in between (hardware transition packages, the entireinstall_omarchy_quattro_packagesset) happens unauthenticated.New
require_signed_omarchy_repo()runs immediately afterinstall_keyringsand deletes the override line, so every later transaction in the upgrade verifies signatures like a normal post-#8072 machine. If the keyring failed to install, the override is left in place and the machine keeps working — the log says why.Tests
New
test/shell.d/t2-repo-signature-test.sh:install/,default/,bin/setsSigLevel = Never;lspci(T2 PCI ids) andpacman-key(arg-validating: only the pinned fingerprint is accepted): stanza written with the armed policy, key imported from the keyserver and locally signed, write is idempotent on a second run;pacman-keythat fails leaves no stanza and exits non-zero;install_keyrings.upgrade-to-quattro-test.shpasses unchanged (22/22). All touched scripts passbash -n.Notes for reviewers
OMARCHY_T2_PACMAN_CONF, a one-variable seam so the test never touches the real/etc/pacman.conf; the variable is unset on real installs and the script writes/etc/pacman.confexactly as before.arch-mact2.db.sigissuer keyid; the t2linux wiki documents the same identity.