T08 · Insecure Dependencies
Error
- Location
- SKILL.md:11
- Finding
- Unpinned and Inconsistent npm Package Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 11-14 **Vulnerability Type**: Third-party package supply-chain exposure **Risk Level**: High ### Vulnerable Code ```bash npx dida365 <command> [options] npm install -g dida365-ai-tools ``` ### Technical Analysis The recommended `npx` package name, `dida365`, differs from the package installed by the alternative global installation command, `dida365-ai-tools`. The documentation does not establish that these packages are maintained by the same trusted publisher or provide an equivalent implementation. The `npx dida365` command may download and immediately execute the currently resolved package version. No exact version, integrity hash, lockfile, or package provenance validation is specified. Consequently, future compromise of the package, namespace confusion, or selection of an unrelated package could cause unreviewed code to execute locally. Because the CLI is also expected to handle a Dida365 session Cookie, a malicious dependency could potentially access both the user's local environment and the supplied authentication credential. ### Attack Path 1. A user follows the recommended `npx dida365` installation method. 2. npm resolves the mutable `dida365` package from the configured registry. 3. An attacker has compromised that package, its maintainer account, or a transitive dependency, or the resolved package is not the intended `dida365-ai-tools` implementation. 4. npm downloads and executes package lifecycle or CLI code under the user's operating-system account. 5. The malicious code reads environment data, local files, shell configuration, cached credentials, or the Dida365 Cookie provided to the CLI. 6. The captured information can be transmitted to infrastructure controlled by the attacker or used to modify Dida365 account data. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user running `npx`. The accessible scope may inc ...[truncated 531 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Determine and document one canonical npm package name. Do not use `dida365` and `dida365-ai-tools` interchangeably unless their relationship is independently verified. 2. Pin an exact reviewed version, for example: ```bash npx --yes dida365-ai-tools@<reviewed-version> <command> [options] ``` 3. Publish and verify package provenance, maintainer identity, repository association, and integrity information. 4. Prefer installation through a lockfile-controlled project dependency instead of downloading a mutable package during each invocation. 5. Review direct and transitive dependencies and use automated dependency monitoring. 6. Where compatible with the package, disable npm lifecycle scripts during installation and explicitly run only reviewed entry points. 7. Document how users can verify that the installed binary originates from the intended package before providing authentication credentials. ]]>
