T03 · Remote Payload Retrieval and Execution
- Location
scripts/install.sh:24- Finding
Unpinned Remote Repository Is Retrieved and Executed During Installation
- Content
View full analysis
Vulnerability Details
File Location:
scripts/install.sh, lines 7 and 24-46
Vulnerability Type: Remote payload retrieval and execution
Risk Level: HighVulnerable Code
bash REPO="https://github.com/dario-github/nous.git"bash # Clone or update if [ -d "$INSTALL_DIR" ]; then echo "📦 Updating existing installation..." cd "$INSTALL_DIR" git pull --ff-only 2>/dev/null || { echo "⚠️ git pull failed, doing fresh clone..." cd /tmp rm -rf "$INSTALL_DIR" git clone "$REPO" "$INSTALL_DIR" cd "$INSTALL_DIR" } else echo "📦 Cloning from GitHub..." git clone "$REPO" "$INSTALL_DIR" cd "$INSTALL_DIR" fi # Install with cozo support (recommended for knowledge graph) echo "📦 Installing Python package..." pip install -e ".[cozo]" 2>/dev/null || { echo "⚠️ cozo-embedded install failed (expected on some platforms)" echo "📦 Installing without KG support..." pip install -e . }Technical Analysis
The installer retrieves the current state of a remote Git repository without pinning an immutable commit, release artifact, checksum, or cryptographic signature. It subsequently passes that downloaded repository to
pip install -e, which can execute package build hooks and install mutable transitive dependencies.The effective payload is therefore not limited to the code reviewed in this skill package. Changes made to the upstream default branch after this audit will automatically become part of future installations. A compromise of the upstream repository, maintainer account, dependency publication process, or an unpinned transitive dependency could introduce arbitrary executable code.
Although the repository URL matches the homepage declared in
SKILL.md, that correspondence does not provide integrity protection or ensure that future repository contents remain trustworthy.Attack Path
...[truncated 1320 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the installation to a specific, reviewed commit hash or immutable signed release instead of the mutable default branch.
- Download a versioned release artifact and verify a published SHA-256 or stronger digest before extracting or executing it.
- Require cryptographic release signatures and verify them against a maintainer key distributed through a separate trusted channel.
- Use a dependency lockfile containing exact versions and hashes for all direct and transitive Python dependencies.
- Invoke Python package installation through the validated interpreter, such as
python3 -m pip, and install into a dedicated virtual environment. - Avoid installing optional dependency groups by default. Require explicit user consent for components such as
cozo. - Perform installation with a non-privileged account and document that the script must not be run with
sudoor as root. - Add CI controls that reproduce and verify release artifacts from reviewed source before publishing an approved version.
