Skip to content

[codex] OM-SEC-04: Require package authenticity during Quattro - #9460

Draft
AFOliveira wants to merge 2 commits into
omacom:quattrofrom
AFOliveira:codex/om-sec-04-quattro-package-authenticity
Draft

AFOliveira wants to merge 2 commits into
omacom:quattrofrom
AFOliveira:codex/om-sec-04-quattro-package-authenticity

Conversation

@AFOliveira

@AFOliveira AFOliveira commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Requires authenticated Omarchy packages from the first Quattro package transaction. The upgrader establishes and verifies the exact packaging-key fingerprint, writes Required DatabaseOptional, checks Pacman's effective package trust policy and removes the unauthenticated retry.

Finding: OM-SEC-04. #8709 overlaps, but its saved Quattro implementation tightens policy after the initial keyring installation. This change establishes the required key and policy before that transaction. Its Apple T2 work remains separate; #9461 handles the T2 provenance path. Keep the package ownership/release ordering in #9070. The closed #9473 is not a dependency and stays closed.

At current-base integration 2412feff, the focused signature suite passed 5 groups, current Quattro suite 25 groups and CLI 112 groups. Native Pacman fixtures confirm that DatabaseOptional permits an unsigned database while packages remain required/trusted; an unsigned fixture package is rejected without changing the target. Current stable/edge keyring archives matched repository metadata, verified signatures and the pinned embedded key. Two Daybreak reviews found no code or integration blocker.

The exact runtime/settings/keyring artifacts for the coordinated release and the distributed legacy 3.x-to-Quattro entrypoint still need integration validation. No live legacy upgrade was performed here. This PR remains draft and claims only the focused package-authenticity boundary.

Pin and verify the exact packaging key, require the effective trusted-only package policy before the first transaction, remove the unauthenticated retry, and cover the boundary with real isolated pacman.
@AFOliveira
AFOliveira force-pushed the codex/om-sec-04-quattro-package-authenticity branch from 368e61a to e0e732a Compare September 1, 2026 22:44
@AFOliveira

Copy link
Copy Markdown
Member Author

Rebuilt from the audit base and force-pushed e0e732a after applying the reviewer playbook. The PR is now two files and 267 total lines including a 215-line regression, down from 827 mixed lines. All sudo-lifetime, migration, T2, overwrite, SDDM, snapshot, and update-sequencing material is gone. Compared with #8709, this keeps only the stronger Quattro invariant: exact key bootstrap and effective PackageRequired/PackageTrustedOnly verification before the first package transaction; #8709’s T2 work stays separate. Local evidence on current quattro b71dcad: real Pacman baseline accepts unsigned/candidate rejects, fingerprint and policy failures close before transaction, mutation detected, Quattro 24/24, CLI 116/116, shell 225/226 with only the base-identical launch-about failure.

@AFOliveira
AFOliveira marked this pull request as ready for review September 1, 2026 22:45
@AFOliveira
AFOliveira marked this pull request as draft September 5, 2026 13:22
@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@sprajs

sprajs commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

One compatibility correction for head 2412feff: fingerprint lookup hard-codes /etc/pacman.d/gnupg, while pacman-key honours the configured GPGDir. When the pin exists only in a custom keyring, lookup checks the wrong directory and aborts. Please resolve GPGDir with pacman-conf and use it for GPG’s --homedir. A synthetic regression fails with this head’s helper and passes with that adaptation.

There is useful native bootstrap evidence for a derivative incorporating this change. Its repository rewrite, key bootstrap, effective-policy gate and first keyring transaction functions are byte-identical to this head; the fingerprint helper is adapted. The derivative also uses a newer upstream base. The exact PR head and full upgrade were not run.

On Omarchy 4.0.4 and an installed runtime constructed from the signature-verified 3.3.0 ISO, native HKPS retrieval, primary-fingerprint verification and local trust succeeded using a fresh configured keyring. Required/trusted policy was verified before the real first keyring transaction. Both installations and population hooks succeeded, and that policy remained afterward.

The 3.3.0 fixture needed a temporary historical guest clock solely to construct its baseline around an expired bundled key; current UTC was restored before candidate execution. Fixture preparation failures were retained. Generic service restart hooks were skipped in chroot. These results cover the adapted bootstrap boundary, not complete desktop, ARM/hardware or future-release qualification.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants