Skip to content

Merge upstream quattro (factory-reset hash scrub + hook/state path guards) - #25

Draft
cursor[bot] wants to merge 4 commits into
quattrofrom
cursor/upstream-changes-pr-5225
Draft

cursor[bot] wants to merge 4 commits into
quattrofrom
cursor/upstream-changes-pr-5225

Conversation

@cursor

@cursor cursor Bot commented Sep 16, 2026

Copy link
Copy Markdown

Merges 2 new first-parent commits (4 cherry-picked non-merge commits) from omacom/omarchy quattro since last night's check (2fbac0c8 / PR #23). Upstream HEAD is now 9c5482c5 (upstream #8170, merged 2026-09-16).

This is everything new since the 2026-09-15 cron. Leftover #18 already landed this morning as PR #24. Fork-only Cursor work is untouched: official-tarball installer, no mise wrapper, usage collector, and the theme-set fix from #22.

Factory reset now actually erases old hashes (upstream omacom#10379, fixes omacom#10378)

  • passwd --lock left the previous root hash in @factory/etc/shadow and the dash-suffixed backups, so the next owner could recover it
  • Shared scrub_factory_accounts now runs on both the staged reset root and the retained @factory baseline: userdel uid≥1000 accounts, set root's password field to !, then delete the shadow-utils backups
  • Follow-up on the same PR also deletes subuid- / subgid- (userdel left the previous owner's subordinate ID range in those backups)
  • Cleanup failures abort before boot rebuild or activation; a failed baseline scrub puts @factory back to read-only
  • First-boot provisioning still sets the new root password

Hook and state names cannot be paths (upstream omacom#8170)

  • omarchy-hook, omarchy-hook-install, and omarchy-state set now refuse an empty name, a name with /, or a name that is exactly . or .. (exit 2)
  • That stops omarchy-hook ../../evil from running ~/.config/evil and omarchy-state set ../../escape from creating ~/.local/escape
  • omarchy-hook-install got the same guard so a slashed type cannot mkdir/cp under hooks/<type>.d before the runner would refuse it
  • Names with dots in the middle (a..b) stay allowed. omarchy-state clear is unchanged: find -name matches basenames only
  • Robustness for future callers, not a shipped-caller fix — every in-repo call still uses a fixed label

Tests

Focused suites passed: hook-state-name-guard-test.sh (19 cases), factory-reset-accounts-test.sh (both roots, repeat reset, six injected cleanup failures; ran via user namespace), and ./test/cli (metadata unchanged).

Open in Web View Automation 

Adolanium and others added 4 commits September 16, 2026 23:04
omarchy-hook and omarchy-state set join a name straight into a path. A name
with a slash, or a bare . or .., points outside the hooks or state directory.
Every caller in the repo passes a fixed label, so this is a footgun guard for
future callers, not a fix for anything that ships today.

Names with dots in the middle (a..b) stay allowed. omarchy-state clear is
untouched: find -name matches basenames only.

(cherry picked from commit 0a65b45)
userdel rewrites /etc/subuid and /etc/subgid, and like every shadow-utils database write it leaves the previous contents behind in a dash-suffixed backup. The scrub removed four of the six backups those tools produce, so the retained @factory baseline still named the previous owner in /etc/subuid- and /etc/subgid- along with their subordinate ID range.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit a00be8f)
The runner already rejects a slash, a bare . or .. The installer still
joined the type into hooks/<type>.d before mkdir/cp, so a name nothing
can run could still land on disk.

(cherry picked from commit e522a18)
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 13ad4c2d-ee28-4db3-a093-78ddb0d0afef

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Factory reset retains the previous owner's password hash

3 participants