T08 · Insecure Dependencies
- Location
scripts/setup.sh:16- Finding
Unpinned Third-Party Package Is Installed and Immediately Executed
- Content
View full analysis
Vulnerability Details
File Location:
scripts/setup.sh, lines 16-25
Vulnerability Type: Unpinned executable dependency and mutable supply-chain artifact
Risk Level: MediumVulnerable Code
bash # 1. Install luca-assistant from PyPI if command -v luca-mcp &>/dev/null; then echo "[ok] luca-assistant already installed" else echo "[..] Installing luca-assistant from PyPI..." uv tool install luca-assistant echo "[ok] Installed" fi # 2. Create data directory and initialize the database mkdir -p "${LUCA_DATA_DIR}" echo "[..] Initializing database (downloading Offer Optimist card data)..." luca initTechnical Analysis
The setup script installs
luca-assistantfrom PyPI without specifying an audited version, validating a package hash, checking a signature, or using a locked dependency manifest. Consequently, the code installed by the same reviewed skill can change between executions.The script then invokes the installed
lucaexecutable throughluca init. The dependency's source code is not included in this project, so its effective behavior—including initialization and network activity—cannot be verified from the audited files. The homepage declared inSKILL.mddoes not cryptographically establish that the retrieved PyPI artifact corresponds to a reviewed source revision.This is a supply-chain weakness rather than evidence that the current upstream package is malicious.
Attack Path
- An attacker compromises the upstream PyPI publisher account, publishing pipeline, package distribution process, or a future release.
- The attacker publishes a modified
luca-assistantpackage under the expected package name. - A user runs
scripts/setup.shon a system whereluca-mcpis not already installed. uv tool install luca-assistantresolves and downloads the attacker-controlled release because no version or artifact hash is pinned.- The setup script invokes
luca init, causing code from the newly installed pa ...[truncated 691 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
luca-assistantto a specific version that has undergone security review, rather than resolving the latest release. - Verify the exact distribution artifact using a trusted cryptographic hash or package signature.
- Maintain a reviewed lockfile or equivalent reproducible dependency manifest, including transitive dependencies.
- Retrieve packages only from a trusted, explicitly configured package index.
- Separate installation from execution so users can verify the installed artifact before
luca initruns. - Run initialization with least privilege and a restricted environment containing only required variables.
- Document the expected network endpoints and downloaded data used by
luca init. - Establish a controlled update process that reviews upstream changes before modifying the pinned version or hashes.
- Pin
