Proof Portal

Project overview

Omarchy

ProbeLabsviewing a historical run

A proof layer — requirements, tests and verified fixes — for two of Omarchy's subsystems: the application menu (launcher scripts, QML model, JSONC config, search and selection) and the lock screen (lock scripts, QML, PAM authentication). Scope is deliberately limited to those components of omacom/omarchy; the rest of the distribution is not covered.

Viewing historical run e77a50eOct 2, 2026, 07:46 AMpr/13012Back to current
Back to findings
Known issueKI-APPLY-LOCK-EXPORTED-FUNCTIONS-ROOT

Exported bash functions execute as root inside apply-lock despite the trusted-PATH replacement

OpenOpenHigh

High-severity issue, currently open.

Description

The issue as recorded.

The EUID==0 control (bin/omarchy-apply-lock:15) replaces PATH but leaves the environment intact. Bash imports the exported functions (BASH_FUNC_grep%%, BASH_FUNC_command_not_found_handle%%, ...) into the function table, and function lookup precedes PATH in bash. A caller-supplied grep runs instead of /usr/bin/grep inside the fingerprint gate (line 48). An imported command_not_found_handle returning 0 makes 'if omarchy-shell lock status' (line 62) TRUE with the binary absent (chroot install). Caller-supplied CODE executes with root privileges - the hostile-environment case the PATH pin exists to refuse (SW-REQ-260912-EKJP trusted_path_only) is reachable anyway.

Affected requirements

The requirement(s) this issue violates — click through to the spec.

Severity, explained

Why this is rated the way it is — and the scoring signals behind the rating (each ⓘ explains the term).

HighRated severity — the impact if this issue is exploited or hit.
why this rating
Reproducer-confirmed
risk area
Availability
Security classification
Not a security surface
CVE surface
None

Where it is

The code the issue lives in — peek the affected function inline to see it in context.

  • bin/omarchy-apply-lock (root lock-screen PAM provisioning)

How it's proven

The reproducer — an actual test that drives the real code and shows the issue happening. Run it yourself, or peek the test and the source it covers.

Known issue reproducedprofileknown_issue_reproducerprovesSW-REQ-260912-EKJP
Reproducer test
Run it yourself
./pocs/crs-260930-g166-c07-c09.sh
Covers (2)
Last run Sep 30, 2026, 11:02 PM

Reproduction steps

Technical steps for your engineers to confirm the issue by hand.

./pocs/crs-260930-g166-c07-c09.sh

What protects you, and the fix

What limits your exposure today, and the planned remediation.

What protects you now

sudo env_reset strips exported functions for the non-root arm; the already-root arm (install/upgrade, no sudo) stays exposed

The fix

Unset imported functions before any decision point: eval 'unset -f $(compgen -A function)' under EUID 0. Alternatively run the body via env -i bash --noprofile --norc. Use 'command' for the pinned lookups

Blast radius

If you touch this issue, what else may need re-checking — the requirements it affects and the code and tests that hang off them. Historical view: authored trace links only — automatically derived links aren't reconstructible for past runs.

No authoredcode links reach these requirements in this historical reconstruction. Automatically derived code links aren't reconstructible for past runs, so implementing code may have existed without an authored trace.

Tracing blast radius…

Evidence trail

The raw evidence manifests behind this finding — superseded by the resolved reproducer above, kept here for traceability.

  • proof/evidence/ki-apply-lock-exported-functions-root.yaml

Change history

Every recorded revision of this finding's source file — when it was added, edited, or re-classified, with the diff for each change.

Discussions

Discuss this with the proof team. Nothing changes in your audit automatically — you open a request and a staff member records any outcome inside the thread.

Sign in to discuss this with the proof team.Sign in