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
Problem
install.shhas a guard for riskyCDIDX_INSTALL_DIRvalues in the local mirror self-test path, but normal install/uninstall paths do not appear to reuse the same protection.Evidence
INSTALL_DIRdefaults fromCDIDX_INSTALL_DIR/$HOME/.local/bin.is_self_test_install_dir_riskynormalizes and rejects well-known install paths or directories containing an executablecdidx, but it is only used by the self-test flow.INSTALL_DIR.Expected behavior
Normalize and validate
INSTALL_DIRfor normal install, reinstall, and uninstall flows, rejecting root, home, empty, ambiguous, or otherwise high-risk targets unless explicitly overridden.Labels
bug,security