Skip to content

install.sh should reject risky INSTALL_DIR values during normal install and uninstall #3511

Description

@Widthdom

Problem

install.sh has a guard for risky CDIDX_INSTALL_DIR values in the local mirror self-test path, but normal install/uninstall paths do not appear to reuse the same protection.

Evidence

  • INSTALL_DIR defaults from CDIDX_INSTALL_DIR / $HOME/.local/bin.
  • is_self_test_install_dir_risky normalizes and rejects well-known install paths or directories containing an executable cdidx, but it is only used by the self-test flow.
  • Normal install/uninstall paths perform moves/removals under INSTALL_DIR.

Expected behavior

Normalize and validate INSTALL_DIR for normal install, reinstall, and uninstall flows, rejecting root, home, empty, ambiguous, or otherwise high-risk targets unless explicitly overridden.

Labels

bug, security

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecurity

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions