T08 · Insecure Dependencies
- Location
- SKILL.md:19
- Finding
- Unpinned installation from mutable remote Git repositories## Vulnerability Details **File Location**: `SKILL.md:19-40` **Vulnerability Type**: Supply-chain exposure through mutable remote dependencies **Risk Level**: High ### Vulnerable Code ```bash pip install git+https://github.com/lizhisec/ymailink.git ``` ```bash # Install with all optional dependencies pip install "git+https://github.com/lizhisec/ymailink.git#egg=ymailink[all]" # Or install specific extras pip install "git+https://github.com/lizhisec/ymailink.git#egg=ymailink[outlook,gmail,keyring,exchange,ai]" ``` ```bash pip install git+https://gitee.com/w3hsec/ymailink.git ``` ```bash # With optional dependencies pip install "git+https://gitee.com/w3hsec/ymailink.git#egg=ymailink[all]" ``` ### Technical Analysis The installation instructions retrieve and execute Python package installation logic directly from mutable Git repository heads. No immutable commit, signed release, package hash, or other integrity constraint is specified. Consequently, the effective code installed by these commands can change after the Skill has been reviewed. The fallback repository is hosted under a different account and no documented trust relationship or synchronization verification is provided. This expands the supply-chain trust boundary and creates an additional compromise point. Installation of a Python package can execute build-backend logic, while the installed CLI executes with the invoking user's permissions. Because this CLI handles mailbox credentials, OAuth tokens, API keys, and email contents, compromise of the dependency could expose particularly sensitive data. ### Attack Path 1. An attacker compromises the GitHub repository, the Gitee mirror, a maintainer account, or the repository publishing process. 2. The attacker modifies the package source or installation/build configuration with malicious code. 3. The user or Agent follows the Skill instructions and installs the current mutable repository head ...[truncated 1188 chars]
- Remediation
- ## Remediation Suggestions 1. Replace branch-head installation with a reviewed, immutable release or exact commit: ```bash pip install "git+https://github.com/lizhisec/ymailink.git@<reviewed-commit-hash>" ``` 2. Prefer a verified package registry release with an exact version and published cryptographic hashes. 3. Use hash-checked lock files or `pip --require-hashes` where practical. 4. Sign releases and verify signatures or attestations before installation. 5. Pin all direct and transitive dependencies used by optional extras. 6. Document the ownership and synchronization process for the Gitee mirror. Do not treat it as an automatic fallback unless its contents are verified against the approved upstream revision. 7. Install into an isolated virtual environment under an unprivileged account. 8. Review package source and build metadata before approving a new release or commit.
