T08 · Insecure Dependencies
- Location
SKILL.md:16- Finding
Execution of Unpinned and Unaudited External Python Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 16–17 and 83–100
Vulnerability Type: Supply-chain risk from unspecified external executable dependencies
Risk Level: MediumComplete Code Snippet
markdown > ⚠️ **外部依赖声明**:本 Skill 引用的 `scripts/graph_sync.py`、`scripts/graph_vectorize.py`、`scripts/graph_search.py` 不包含在本目录中。 > 它们是与知识图谱绑定的独立 Python 工具集,需从项目仓库单独获取,或根据本 Skill 描述的接口自行实现。bash # 同步图谱数据到 SQLite python3 scripts/graph_sync.py --syncbash # 为图谱内容生成向量索引 python3 scripts/graph_vectorize.py --indexbash python3 scripts/graph_search.py "查询内容" --top 5Technical Analysis
The Skill instructs users to execute three Python programs that are not included in the audited package. It states that these tools must be obtained separately from a project repository, but it does not identify an authoritative repository URL, trusted publisher, immutable version or commit, cryptographic checksum, or signature.
As a result, the effective executable behavior cannot be reviewed from this project and may vary according to where and when the scripts are obtained. An attacker could distribute malicious files under the expected names or compromise a mutable upstream source. Because Python executes module-level code immediately, merely invoking any substituted script is sufficient to run attacker-controlled code.
Attack Path
- A user follows the Skill and searches for or otherwise obtains the missing graph scripts.
- The user retrieves them from a malicious, compromised, or incorrect source because no authoritative source or integrity value is specified.
- The malicious files use the expected names, such as
graph_sync.pyorgraph_vectorize.py. - The user places the files under the local
scripts/directory. - The user runs one of the documented
python3 scripts/...commands. - Python executes the substituted program with the user's privileges, allowin ...[truncated 693 chars]
- Remediation
View remediation
Remediation Suggestions
- Include the required scripts in the Skill package so their complete source can be audited together with the instructions.
- If external distribution is necessary, specify one authoritative HTTPS repository controlled by the publisher.
- Pin each dependency to an immutable release or commit rather than a branch or mutable download URL.
- Publish and verify SHA-256 hashes or cryptographic signatures before execution.
- Document a verification workflow that fails closed when a signature or checksum does not match.
- Review the scripts for network access, subprocess execution, unsafe deserialization, secret handling, and filesystem write scope.
- Run the tools with a dedicated least-privilege account and restrict access to unrelated credentials and files.
- Test newly obtained scripts in an isolated environment before granting access to production graph data.
