T08 · Insecure Dependencies
- Location
references/auth.md:5- Finding
Unpinned Third-Party CLI Installation Creates a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
references/auth.md, lines 5–9
Vulnerability Type: T08: Insecure Dependencies
Risk Level: MediumComplete Code Snippet:
markdown If not installed: ```bash uv tool install maimai-clitext ### Technical Analysis The installation command retrieves `maimai-cli` without specifying an exact version, package hash, lockfile, or trusted package index. Consequently, the installed executable may differ from the artifact reviewed during this audit. The external CLI performs security-sensitive operations, including importing and storing an authenticated Maimai Cookie, accessing account data, downloading content, and issuing authenticated API requests. Because the CLI implementation is not included in this project, its behavior could not be verified. If the package registry, package release, maintainer account, or transitive dependency were compromised, a malicious release could execute with the privileges of the user running the installation. This finding identifies a supply-chain exposure, not confirmed malicious behavior. The reviewed documentation contains explicit Cookie-safety guidance, and no embedded malicious scripts, obfuscated payloads, persistence mechanisms, or credential-exfiltration instructions were found. ### Attack Path 1. An attacker compromises the package publisher, package registry entry, or a dependency used by `maimai-cli`, or publishes an unexpected package version through an unsafe resolution source. 2. A user follows the documented command: ```bash uv tool install maimai-cli ``` 3. The package manager resolves and installs the currently available package rather than a reviewed, immutable release. 4. The user invokes the installed `maimai` executable and imports an authenticated Cookie. 5. Malicious package code executes under the user's account and may read the supplied credential, access files available to that account, mak ...[truncated 672 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the package to an exact reviewed version, for example:
bash uv tool install 'maimai-cli==1.1.0' - Use cryptographic hashes or an equivalent integrity-verified lock mechanism so that the resolved package artifact is immutable.
- Explicitly configure and document the trusted package index. Disable unintended fallback indexes where supported to reduce dependency-confusion risk.
- Pin and audit transitive dependencies in the CLI's distributable package.
- Link the documented Skill version to a specific source commit and reproducible release artifact.
- Include or vendor the executable source in the audited project when feasible, allowing the credential handling, file permissions, network destinations, and download behavior to be reviewed.
- Publish signed release artifacts and verify signatures or attestations before installation.
- Run the CLI with least privilege and ensure stored Cookie files are restricted to the current user.
- Add an upgrade process requiring security review before changing the pinned version.
- Pin the package to an exact reviewed version, for example:
