T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:95- Finding
Unpinned Remote Repository, Dependencies, and Download Scripts
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 95–122
Vulnerability Type:T03: Remote Payload Retrieval and Execution, T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
bash # 1. Clone repository git clone https://github.com/alibaba/Logics-Parsing.git cd Logics-Parsing # 2. Create environment (Python 3.10) conda create -n logics-parsing python=3.10 conda activate logics-parsing # 3. Install dependencies pip install -r requirements.txt # 4. Download model (Modelscope) pip install modelscope python download_model_v2.py -t modelscope # Or download from HuggingFace pip install huggingface_hub python download_model_v2.py -t huggingfaceThe alternative v1 instructions repeat the unsafe pattern:
bash conda create -n logics-parsing python=3.10 conda activate logics-parsing pip install -r requirements.txt # Download model python download_model.py -t modelscopeTechnical Analysis
The instructions clone the default branch of an external Git repository without pinning it to a reviewed release or full commit hash. The effective content can therefore change after this Skill has been audited.
The instructions subsequently install the cloned repository's dependency set and execute its model-download scripts. Neither package versions nor cryptographic hashes are specified in this Skill. The separately installed
modelscopeandhuggingface_hubpackages are also unpinned. Python package installation may execute package-controlled build or installation logic, while the downloaded repository scripts execute directly with the user's privileges.The artifact itself contains no executable scripts or demonstrated malicious payload. The issue is the transfer of trust to mutable upstream code, package releases, transitive dependencies, and model artifacts that are outside this audit's scope.
Attack Path
- An attacker compromises the upstream repository, a package publisher account, a transitive dependency, ...[truncated 1162 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin the Git repository to a reviewed release and immutable full commit hash:
bash git clone --branch <reviewed-tag> --depth 1 https://github.com/alibaba/Logics-Parsing.git cd Logics-Parsing test "$(git rev-parse HEAD)" = "<expected-full-commit-hash>" -
Maintain a reviewed lock file containing exact direct and transitive dependency versions.
-
Require cryptographic package hashes, for example through a generated requirements file used with:
bash python -m pip install --require-hashes -r requirements.lock -
Pin
modelscope,huggingface_hub, and all related packages to reviewed versions and hashes. -
Document authoritative model artifact URLs, expected filenames, versions, sizes, and SHA-256 checksums. Verify every artifact before loading it.
-
Audit
download_model_v2.py,download_model.py, dependency metadata, and installation hooks at the pinned commit before recommending their execution. -
Run installation and inference in a least-privileged container or isolated account with restricted filesystem access, no unnecessary credentials, and controlled outbound network access.
-
Avoid running installation commands as root or with
sudo, and publish a process for reviewing and intentionally updating pinned revisions.
-
