T08 · Insecure Dependencies
- Location
SKILL.md:30- Finding
Execution of an Unpinned npm Package with Access to API Credentials
- Content
View full analysis
" --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill socialdatax-weibo-comments npx -y socialdatax-skills@latest weibo comments \ --post-url "" --pretty \ --source-client socialdatax-skills --source-platform clawhub \ --source-skill socialdatax-weibo-comments npx -y socialdatax-skills@latest weibo replies \ --post-id "" --comment-id "" --pretty \ --source-client socialdatax-skills --source-platform clawhub \ --source-skill socialdatax-weibo-comments ``` ```text If the current environment has permission, install or restore automatically. ``` ### Technical Analysis The Skill directs the agent to execute `socialdatax-skills@latest` through `npx -y`. The `@latest` selector does not identify an immutable, previously reviewed package version. Each invocation may therefore download and run a different package release. The `-y` option also suppresses the normal package-installation confirmation. The package executes as local Node.js code with the permissions of the agent process. The Skill requires `SOCIALDATAX_API_KEY`, so the downloaded package is expected to receive or be able to access that credential. The implementation of `socialdatax-skills` is not included in the audited project, preventing verification of: - The package code that ...[truncated 2615 chars]- Remediation
View remediation
... ``` 2. Commit a package lockfile containing registry-resolved URLs and integrity hashes, and use a deterministic installation mechanism such as `npm ci`. 3. Avoid automatic dependency installation or restoration. Require explicit authorization when a package is absent or when its version or integrity differs from the reviewed value. 4. Verify npm publisher provenance and signed build or release metadata where available. 5. Include the client implementation in the audited project, or provide a reproducible source reference for the exact released artifact. 6. Restrict outbound network access to documented SocialDataX endpoints and the minimum endpoints necessary for the requested operation. 7. Run the client in a sandbox with access only to `SOCIALDATAX_API_KEY` and required request data. Remove unrelated environment variables and limit filesystem access. 8. Use a narrowly scoped, revocable API key with usage limits, monitoring, and rotation procedures. 9. Document how the API key, post identifiers, pagination tokens, and returned data are transmitted and retained. 10. Remove `@latest` and update dependencies only through a controlled review process that repeats security analysis before changing the pinned version. ]]>
