T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:43- Finding
Unpinned Remote Repository and Dependency Retrieval Followed by Local Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 43–46
Vulnerability Type: Remote payload retrieval and insecure dependency execution
Risk Level: Highbash git clone https://github.com/openclaw-skills/ai-intelligent-ad-optimization cd ai-intelligent-ad-optimization pip install -r requirements.txt python app.pyTechnical Analysis
The installation instructions clone a mutable external Git repository without pinning a commit hash or verifying a signed release. They then install dependencies from an unaudited
requirements.txtand execute an unauditedapp.py.The audited project contains only
SKILL.md; neitherrequirements.txtnorapp.pyis included. Consequently, the code ultimately installed and executed is outside the reviewed artifact and can change after this audit. In addition, Python package installation can execute package build or installation hooks, meaning code execution may occur duringpip installbeforeapp.pyis explicitly launched.This primarily constitutes
T03: Remote Payload Retrieval and Executionbecause the effective executable payload is fetched from a mutable external location. It also constitutesT08: Insecure Dependenciesbecause dependency versions, sources, and cryptographic hashes are not available or verified in the audited artifact.Attack Path
- An attacker compromises the referenced GitHub repository, an upstream maintainer account, or a dependency referenced by its unavailable
requirements.txt. - The attacker modifies
app.py, the dependency manifest, or a dependency package to contain malicious code. - A user follows the documented installation procedure and clones the current repository state without a verified commit or release pin.
pip install -r requirements.txtinstalls attacker-controlled dependencies and may execute malicious package installation or build hooks.- The user runs
python app.py, directly executing the ...[truncated 910 chars]
- An attacker compromises the referenced GitHub repository, an upstream maintainer account, or a dependency referenced by its unavailable
- Remediation
View remediation
Remediation Suggestions
- Include the actual application source and dependency manifest in the skill package so they can be reviewed together.
- Replace the mutable repository clone with a verified, immutable commit or signed release. Check the downloaded revision against an expected commit hash before installation.
- Pin all Python dependencies to exact versions and cryptographic hashes, such as through a lock file and
pip install --require-hashes. - Permit dependency retrieval only from explicitly trusted package indexes and disable unintended fallback indexes to reduce dependency-confusion risk.
- Verify release signatures, package provenance, and integrity before executing any retrieved content.
- Install dependencies in an isolated virtual environment or container and run the application as a dedicated, non-privileged user.
- Restrict filesystem, credential, and network access to the minimum required for the advertised advertising-optimization functionality.
- Review the pinned
app.py, dependency manifests, transitive dependencies, and package installation hooks before recommending execution.
