omarchy-backup runs as the current user. Restore may invoke sudo pacman,
install and enable Omarchy plugins, write user configuration and user systemd
units, and start units recorded in a snapshot. A restore is therefore a
high-trust operation even though normal snapshot/status commands are not.
- Snapshot names are one validated path component everywhere they are used.
- Remote
index.jsonreads have producer-side byte limits, hard deadlines, bounded arrays/strings, strict field types/content, and unique safe names. - Retention derives purge targets only beneath the configured host prefix after validation.
- Remote operations have hard deadlines; pulls request only the three expected snapshot files.
- Widget wrappers cap child output before JSON encoding and before Quickshell's
StdioCollectorsees it. - Local configuration, state, logs, and snapshot files are owner-only.
The user decides whether a self-created snapshot and its storage location are
trusted enough to restore. Checksums and rclone check detect corruption and
incomplete transfer, but a party able to replace both payload and manifest can
create a self-consistent malicious snapshot. The tool exposes that boundary and
provides restore --dry-run; it does not take ownership of the user's trust
decision or forbid an explicitly requested restore.
Planned defense-in-depth work, in priority order:
- Optionally add detached signatures or a MAC whose trust key is kept
separately from the backup endpoint. Verification should give the user
stronger evidence and a clear warning, while an explicit user override must
remain possible. Authentication metadata must remain a detached sidecar: the
standard
tar.zstpayload must always stay manually readable without this tool. - Extend restore-manifest plausibility checks beyond plugins. Plugin ids,
remotes and commits are already validated and the pinned commit is checked
out detached in a staging clone before
omarchy plugin addor any enable step runs; a plugin whose pin cannot be satisfied is neither installed nor enabled. Package and unit names still go topacman/systemctlwith only basic quoting; add argument arrays/option terminators and inspect archive paths/types before writing. This is robustness against a damaged or hand-edited manifest, not a substitute for the user trusting their own snapshot. - Cap downloaded snapshot bytes, decompressed bytes, archive members, and plugin-diff sizes to resist disk/memory/decompression denial of service.
- Replace shell
sourceloading ofconfig.confwith a non-executing parser. - Add opt-in content-aware secret scanning; filename patterns alone cannot detect credentials embedded in otherwise ordinary configuration files or uncommitted plugin diffs.
Report vulnerabilities privately to the repository owner before opening a public issue when disclosure would put existing backups at risk.