Skip to content

Fix the bar visibility toggle and make the acceptance suite cover 4.0.2 security hardening - #9240

Merged
ryanrhughes merged 5 commits into
quattrofrom
fix/acceptance-security-coverage
Aug 30, 2026
Merged

ryanrhughes merged 5 commits into
quattrofrom
fix/acceptance-security-coverage

Conversation

@ryanrhughes

Copy link
Copy Markdown
Collaborator

Fallout from verifying 4.0.2-rc end to end with omarchy-iso-test. Five commits, each validated against an installed 4.0.2-rc VM:

  • Nudge the bar over IPC when toggling visibility. The FileView watch on the toggles directory can permanently stop delivering events after flag changes land in quick succession, stranding the bar off screen until the shell restarts (reproducible with omarchy-toggle-bar cycles; even slow flag changes go unnoticed once the watch dies). omarchy-toggle-bar now nudges the bar's probe over IPC after flipping the flag. Verified: 8 tight hide/reveal cycles green where the unpatched shell wedged on cycle 2.
  • Default the suite's OMARCHY_PATH to the running session's tree. qs matches shell instances by config path, so a suite defaulted to its own root reads the session shell as "not running" — with only test/ synced it also broke omarchy-shell outright and let the package audit pass vacuously. Ask the user manager for the session's OMARCHY_PATH first.
  • Fail the package audit when the manifest is missing (it reported "0 missing" after checking nothing).
  • Capture OCR screenshots at 2x scale. Tesseract drops small caption text at native resolution — the weather panel's WIND label failed with the text plainly on screen.
  • Cover the 4.0.2 security hardening in the acceptance suite. New security-test.sh asserts the closed session-to-root paths (no blanket input group, no shipped asdcontrol sudoers grant) and exercises omarchy-setup-security-sshd --key=… unattended end to end: sshd up, key authorized, password + keyboard-interactive auth off in sshd -T, SSH port rate limited. The mutating sshd section requires the explicit OMARCHY_ACCEPTANCE_SUDO_PASSWORD opt-in (omarchy-iso-test passes it for throwaway VMs); a cached sudo timestamp alone never triggers it.

Companion harness PR: omacom/omarchy-iso#139 (syncs the whole test suite, passes the sudo opt-in, restarts the shell from the synced tree under --sync-all).

One caveat observed while re-running the suite repeatedly in the same mutated VM: on the third consecutive sshd hardening exercise, the setup command's own sshd -T verification reported the restrictions not applied and backed the config out. Fresh VMs passed consistently; flagging in case the first-value-wins check has an ordering race worth a look.

The shell notices the bar-off flag through a FileView watch on the toggles
directory, and that watch can permanently stop delivering events after flag
changes land in quick succession — the bar then stays parked off screen
until the shell restarts. Have omarchy-toggle-bar nudge the bar's probe
over IPC after flipping the flag, so the toggle no longer depends on the
watch staying alive. The watch remains for other writers of the flag.
Run over SSH with no OMARCHY_PATH, the acceptance runner defaulted it to
its own root — wrong in both sync modes omarchy-iso-test uses. With only
test/ synced, the root has no shell or install manifests: omarchy-shell
refuses every call and the package audit passes vacuously against an empty
manifest. With a full tree synced, the path disagrees with the config path
the session shell was started from, and since qs matches instances by that
path, every omarchy-shell call reads as "not running".

The suite acts on the running session, so ask the user manager for the
session's own OMARCHY_PATH first, then fall back to this checkout, then to
the installed tree.
Reading a nonexistent manifest produced an empty package list, so the audit
reported every package installed after checking none of them.
Tesseract routinely drops small caption text at native resolution — the
weather panel's detail labels fail the WIND assertion with the text plainly
on screen. Let the compositor upscale the capture instead.
Assert the closed session-to-root paths on an installed system — no blanket
input-group membership, no shipped asdcontrol sudoers grant — and exercise
omarchy-setup-security-sshd unattended end to end: sshd up, key authorized,
password and keyboard-interactive authentication off in the effective
config, SSH port rate limited in the firewall.

The sshd section mutates the machine, so it requires the explicit
OMARCHY_ACCEPTANCE_SUDO_PASSWORD opt-in that omarchy-iso-test passes for
its throwaway VMs; elsewhere it skips.
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