Skip to content

[codex] OM-SEC-05: Remove the unsigned Apple T2 package source - #9461

Draft
AFOliveira wants to merge 6 commits into
omacom:quattrofrom
AFOliveira:codex/om-sec-05-t2-package-provenance
Draft

AFOliveira wants to merge 6 commits into
omacom:quattrofrom
AFOliveira:codex/om-sec-05-t2-package-provenance

Conversation

@AFOliveira

@AFOliveira AFOliveira commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Retire Omarchy's unauthenticated Apple T2 package source and require all five replacements from the signed Omarchy repository before setup or migration can complete (OM-SEC-05).

The migration resolves effective policy through pacman-conf, including inheritance, includes and directive precedence. DatabaseOptional and other database-only exceptions do not cause safe package policy to be removed. An unsafe Omarchy-created arch-mact2 section is privately backed up and disabled before the package transaction. An unsafe section wholly inside a custom include remains pending with explicit administrator recovery instructions; it is not silently marked repaired.

Affected machines use one fixed, packaged system operation under a machine lock. It rechecks shared state after acquiring the lock, runs without nested sudo prompts, and publishes completion only after a successful reinstall. Unaffected and already repaired machines need no authentication request. Discovery failures remain pending. Both queries and installation use explicit omarchy/package targets, and same-version packages are reinstalled because their existing bytes may come from the retired unsigned source.

Fresh setup follows the same policy and repository checks, propagates PCI discovery errors and writes hardware configuration only after authenticated package installation succeeds. The PR remains limited to four files.

Validation on 9fb88358e73e2fce9d6a0a1b67d8ad5707e0f95f, integrated with quattro e848f1df:

  • 12 focused test groups passed, including native policy resolution, real flock concurrency, query/discovery failures, retries, completion ordering and repository-bound transactions.
  • Real isolated Pacman rejected an unsigned fixture under the final mandatory-package-signature policy.
  • Six existing T2 hardware fixture groups, 112 CLI checks, Bash syntax and whitespace checks passed.
  • Daybreak independently reviewed this revision and found no remaining local code blocker after the serialization and repository-target follow-ups.

This remains a draft. The current stable, rc and edge repository databases contain none of linux-t2, linux-t2-headers, apple-t2-audio-config, apple-bcm-firmware or t2fanrd. All five signed artifacts, production trust-chain acceptance, package lifecycle and real T2 boot/audio/connectivity/fan behavior remain release gates. Fixture coverage does not establish hardware readiness.

Related: #8709 also changes T2 signature policy, but optional package signatures still permit unsigned packages. This PR requires a complete authenticated replacement set. Quattro bootstrap authenticity is handled separately in #9460.

Retire the unauthenticated source, fail closed until all five signed Omarchy replacements exist, reinstall without trusting legacy bytes, and publish completion only after explicit transaction success.
@AFOliveira
AFOliveira force-pushed the codex/om-sec-05-t2-package-provenance branch from f50792a to 7b66647 Compare September 1, 2026 22:53
@AFOliveira

Copy link
Copy Markdown
Member Author

Narrowed and force-pushed 7b66647 after local re-review. The shared OM-SEC-04/05 test is gone; this PR now has a T2-only provenance regression and four files total (328 lines vs 495). It also explicitly handles reinstall failure before marker publication. Compared with #8709, this removes the unauthenticated source and fails closed rather than continuing to accept unsigned packages under PackageOptional. Local evidence on current quattro b71dcad: real Pacman SigLevel=Never proof succeeds, repository-origin mutation detected, focused provenance and T2 hardware tests pass, CLI 116/116, shell 225/226 with only the base-identical launch-about failure. Keeping the PR draft: all five signed replacement packages are still a release blocker.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The migration incorrectly treats secure DatabaseOptional policy as unsafe and removes the repository section.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Retires the unsigned Apple T2 repository and requires authenticated replacements from Omarchy’s repository.

Changes:

  • Removes the legacy arch-mact2 source.
  • Adds signed-policy and package-origin validation.
  • Migrates existing installations and adds provenance regressions.
File summaries
File Description
install/hardware/pacman.sh Stops restoring the unsigned repository.
install/hardware/apple/fix-t2.sh Gates T2 setup on trusted packages.
migrations/1788163636.sh Disables the legacy source and reinstalls packages securely.
test/shell.d/t2-package-provenance-test.sh Tests policy, provenance, failure, and retry behavior.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread migrations/1788163636.sh Outdated
found { print }
' "$pacman_conf")
[[ -n $section ]] || return 0
/usr/bin/grep -Eq '^[[:space:]]*SigLevel[[:space:]]*=.*((Package)?(Never|Optional)|TrustAll)([[:space:]]|$)' <<<"$section" || return 0
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