T08 · Insecure Dependencies
Warning
- Location
- setup.sh:19
- Finding
- Mutable and Unverified Dataset Dependency## Vulnerability Details **File Location**: `setup.sh`, line 19 **Vulnerability Type**: Unpinned and unverified third-party dependency **Risk Level**: Medium ### Vulnerable Code ```bash git clone --depth 1 https://github.com/chinese-poetry/chinese-poetry.git "$DATA_DIR" ``` ### Technical Analysis The setup script clones the current default branch of a third-party GitHub repository without pinning a reviewed commit, tag, or release and without validating a cryptographic checksum or signature. The installed dataset can therefore change after this skill has been reviewed. Although the script does not execute files from the downloaded repository, it treats the downloaded corpus as trusted input for later poetry queries and generation. A compromised upstream repository, maintainer account, or distribution path could introduce manipulated or adversarial corpus content. The subsequent deletion of the `.git` directory also removes useful provenance information that could otherwise help determine the installed revision. This is a supply-chain integrity weakness rather than direct remote code execution. ### Attack Path 1. An attacker compromises the upstream repository or an authorized maintainer account. 2. The attacker modifies content on the repository's default branch. 3. A user runs `./setup.sh`. 4. The script shallow-clones the mutable default branch without checking an expected commit or checksum. 5. The downloaded content is accepted and stored in `data/`. 6. The agent later consumes the manipulated corpus during poetry queries or as reference material for generated responses. ### Impact Assessment The attacker does not obtain operating-system privileges through the code shown because the downloaded files are not executed. The direct impact is limited to the integrity and reliability of the skill's dataset and resulting responses. Potential effects include corpus poisoning, inaccurate attribution or text, manipulated query output, and exposure of the ag ...[truncated 186 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to a reviewed immutable commit SHA rather than cloning the current default branch. 2. Fetch that specific revision and verify that the checked-out commit exactly matches the approved SHA. 3. Prefer a versioned archive with a published SHA-256 checksum or a cryptographically signed release. 4. Fail closed when signature, checksum, or commit verification fails. 5. Maintain an allowlist or manifest of expected dataset paths and reject unexpected executable files, symbolic links, or other unapproved content. 6. Record the installed revision and verification result in a local provenance manifest before removing Git metadata. 7. Periodically review and deliberately update the pinned revision rather than accepting upstream changes automatically.
