T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:29
- Finding
- Unpinned npm Package Is Automatically Retrieved and Executed## Vulnerability Details **File Location**: `SKILL.md`, lines 5, 29–41, and 83 **Vulnerability Type**: Mutable and unverified third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"openclaw":{"requires":{"env":["SOCIALDATAX_API_KEY"],"bins":["node","npm"]},"primaryEnv":"SOCIALDATAX_API_KEY","install":[{"kind":"node","package":"socialdatax-skills","bins":[]}],"emoji":"🎙️","homepage":"https://socialdatax.com/ai?from=clawhub"}} ``` ```bash npx -y socialdatax-skills@latest douyin transcript \ --url "<douyin_content_url_or_share_text>" --pretty \ --source-client socialdatax-skills --source-platform clawhub \ --source-skill douyin-video-copy-extract npx -y socialdatax-skills@latest douyin transcript \ --aweme-id "<aweme_id>" --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill douyin-video-copy-extract npx -y socialdatax-skills@latest douyin transcript \ --job-id "<job_id>" --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill douyin-video-copy-extract ``` ```text If the current environment has permission, install or restore automatically. ``` ### Technical Analysis The Skill instructs the agent to run `socialdatax-skills@latest` through `npx -y`. The `@latest` tag is mutable and can resolve to different package contents after this Skill has been reviewed. The `-y` option suppresses interactive installation confirmation, while the metadata installation declaration also references the package without an exact version. The project contains no lockfile, integrity hash, vendored implementation, or exact package version that would bind execution to reviewed content. Therefore, the effective code executed by this Skill is controlled by the npm package version available at runtime rather than by the audited project. This is an insecure dependency and supply-chain execution pa ...[truncated 1637 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `socialdatax-skills@latest` with an exact, reviewed package version in every command, such as `socialdatax-skills@X.Y.Z`. 2. Pin the same exact version in the Skill metadata installation declaration. 3. Use a lockfile or npm integrity metadata so the downloaded artifact is cryptographically bound to an expected package archive. 4. Upgrade only through an explicit review process that verifies the new package contents and provenance before changing the pinned version. 5. Avoid automatic restoration or installation without user approval, particularly when the dependency version or integrity cannot be verified. 6. Disable npm lifecycle scripts during installation where operationally feasible, and verify that the package remains functional under that restriction. 7. Execute the CLI in a restricted environment with minimal filesystem permissions, narrowly scoped network access, and only the required environment variables. 8. Avoid exposing unrelated credentials to the subprocess; provide only `SOCIALDATAX_API_KEY` when it is required. 9. Consider vendoring and auditing the necessary implementation or distributing a verified artifact through a trusted, controlled release channel.
