Skip to content

Stop update-keyring from claiming success when key operations fail - #7807

Merged
ErikMelton merged 1 commit into
omacom:quattrofrom
Adolanium:keyring-fail-loud
Sep 15, 2026
Merged

ErikMelton merged 1 commit into
omacom:quattrofrom
Adolanium:keyring-fail-loud

Conversation

@Adolanium

Copy link
Copy Markdown
Contributor

omarchy-update-keyring has no set -e. If pacman-key --recv-keys fails, or the closing pacman -Sy archlinux-keyring reinstall fails, the script carries on and its last line, echo "Keys are correct", makes the exit status 0.

omarchy-update runs this as a trusted pre-step before the main transaction, under set -e. So a keyserver outage or a broken keyring gets reported as success here and only surfaces later, as signature errors in the middle of the update. That is the readable early failure this pre-step exists to give, lost.

Two changes:

  • set -euo pipefail at the top, so a failed recv, lsign, sync, or reinstall stops the script with a non-zero exit.
  • The success line now sits behind a final pacman-key --list-keys check, so "Keys are correct" is only printed once the key verifiably exists.

Tests: new test/shell.d/update-keyring-test.sh stubs sudo and the pkg helpers and drives each failure point with env vars. Six cases: the healthy run, the populate path, a failed recv, a failed reinstall, and a final-check failure, plus the reinstall still running on the healthy path. All 6 pass, and the three failure cases fail against the old version of the script, so they catch the bug they describe. ./test/shell comes out the same on this branch as on the base commit, 1522 passing here with the 6 new, same 54 failures either way. Those 54 are tools missing from my environment, jq and lua and magick and others, and not anything this touches. ./test/cli needs jq and would not run on this machine at all.

Copilot AI balanced review requested due to automatic review settings August 22, 2026 18:22

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.

Pull request overview

Ensures keyring update failures propagate before the main system update.

Changes:

  • Enables strict Bash failure handling.
  • Verifies the Omarchy signing key before reporting success.
  • Adds coverage for healthy, population, and failure paths.

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 1 out of 2 changed files in this pull request and generated no comments.

File Description
bin/omarchy-update-keyring Propagates failures and verifies the key before success.
test/shell.d/update-keyring-test.sh Tests successful and failed keyring operations.

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

@ErikMelton
ErikMelton merged commit 4941894 into omacom:quattro Sep 15, 2026
mark-groves pushed a commit to mark-groves/omarchy that referenced this pull request Sep 16, 2026
Stop update-keyring from claiming success when key operations fail

(cherry picked from commit 4941894)
mark-groves added a commit to mark-groves/omarchy that referenced this pull request Sep 16, 2026
#23)

* [Security] Keep the Windows VM password out of the RDP client's argument list

`launch_windows` passed the VM password to xfreerdp3 as `/p:"$WIN_PASS"`.
`/proc/<pid>/cmdline` is world-readable, so every other user on the machine
could read the password for as long as the session stayed open — `ps` was
enough.

The arguments now go in over stdin with `/args-from:stdin`, leaving only that
flag in the process list. The argument list itself is unchanged, and building
it as an array also fixes the unquoted `$RDP_SCALE` expansion.

(cherry picked from commit fa3f607)

* Switch TCP congestion control to BBR with fq pacing

Cubic keeps pushing until packets drop, which stands queues up in the path
on fast links. BBR paces to its estimate of bottleneck bandwidth and minimum
RTT instead, cutting queueing latency while keeping throughput. fq is the
qdisc BBR is built to pace through.

tcp_bbr and sch_fq are modules in every kernel Omarchy ships and autoload
when the sysctls are set. The migration re-applies the shipped file so new
connections switch without a reboot, no-ops once the live values match, and
flags a reboot if applying fails.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 9246647)

* Merge pull request omacom#7807 from Adolanium/keyring-fail-loud

Stop update-keyring from claiming success when key operations fail

(cherry picked from commit 4941894)

* [Security] Keep screen-recording state out of world-writable /tmp (omacom#8374)

* Keep screen-recording state out of world-writable /tmp

* Compare the /tmp name across the run instead of requiring it absent

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Fall back to the state directory when there is no runtime dir

* Let the /tmp snapshot come back empty

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Resolve the region file the same way in the resizer

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Protect recording fallback state and document its path

---------

Co-authored-by: Omabot <omabot@omarchy.org>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit b44fb74)

* Remove unsafe project bin PATH injection (omacom#11336)

* Remove unsafe project bin PATH injection

* Cover customized unsafe Mise paths

* Revoke legacy Mise Work trust

* Harden legacy Mise trust cleanup

* Preserve ignored Mise Work configs

* Scope Mise path cleanup to env

* Accept paranoid Mise ignore marker

Reported-by: infosec-us-team
(cherry picked from commit a73bcbf)

* Treat matching kernel headers as a base system guarantee

DKMS hardware installers now assume headers are already present. Existing installs get linux-omarchy or linux-t2 headers via migration 1789444024 when those kernels are installed. The ISO package list still keeps the fork's linux/linux-ptl set until the default-kernel PR lands.

Co-authored-by: Mark Groves <mark-groves@users.noreply.github.com>

* Set up the Claude browser extension when choosing Claude

Picking Claude as the default agent now best-effort installs the official Chromium-family extension. A cancelled or failed install still selects and launches Claude. Cursor remains the official-tarball path and is not installed through mise.

Co-authored-by: Mark Groves <mark-groves@users.noreply.github.com>

---------

Co-authored-by: Paolo Pellicori <pellicori.paolo@gmail.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Adolanium <94890352+Adolanium@users.noreply.github.com>
Co-authored-by: Taksh Kothari <takshkothari09@gmail.com>
Co-authored-by: Omabot <omabot@omarchy.org>
Co-authored-by: Erik Melton <meltonaerik@gmail.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Mark Groves <mark-groves@users.noreply.github.com>
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
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.

4 participants