Skip to content

[P1/security] is_rpm_ostree is too narrow — doesn't cover Flatpak, NixOS, containerized envs #354

Closed

Description

@EVWorth

Context

src-tauri/src/commands/mod.rs:496 (Ok(Path::new("/usr/bin/rpm-ostree").exists())).

Problem

The check is a single file-existence test. A user with sudo could create a fake /usr/bin/rpm-ostree that returns nothing useful, but more realistically, the check is too narrow: it doesn't consider Flatpak installs (where the rpm-ostree binary might be in /app/bin/ or similar), NixOS (/nix/store/...), or containerized environments. The frontend relying on this flag to gate the auto-update flow means a Flatpak user gets the auto-update path even though their runtime doesn't support it.

Files

  • src-tauri/src/commands/mod.rs:496

Expected

A Flatpak'd SQLPilot install reports Platform::Flatpak; an rpm-ostree system reports Platform::RpmOstree; a standard Ubuntu install reports Platform::Standard.

Proposed fix

Scope M — extend the check to also look at /run/ostree-booted (presence indicates an rpm-ostree system at the filesystem level), /etc/os-release for VARIANT_ID=*atomic* or ID=*bazzite*/silverblue*/kinoite*, and the container env var. Return enum Platform { Standard, RpmOstree, Flatpak, Unknown } instead of bool. The frontend then routes based on the variant.

Acceptance

A Flatpak'd SQLPilot install reports Platform::Flatpak; an rpm-ostree system reports Platform::RpmOstree; a standard Ubuntu install reports Platform::Standard.

Needs human verify

yes

Activity

  1. added
    audit
    severity/p1
    kind/security
    area/theming
    on Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/themingauditkind/securityseverity/p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions