T08 · Insecure Dependencies
- Location
SKILL.md:280- Finding
Unverifiable and Unpinned npm Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 280–285
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
bash cd .claude/skills/yida-publish-page/scripts npm install # First-time dependency installation node publish.js <appType> <formUuid> <source-file-path>Technical Analysis
The skill instructs the agent to execute
npm installin the directory of a separately referenced publishing sub-skill. The audited project contains onlySKILL.md; it does not include the referenced directory, apackage.json, or a dependency lockfile. Consequently, the dependency names, resolved versions, integrity hashes, package sources, and lifecycle scripts cannot be verified within the audited artifact.Running
npm installcan download third-party packages and execute their lifecycle scripts, includingpreinstall,install, andpostinstall. If the external publishing sub-skill uses unpinned or compromised dependencies, installation could execute arbitrary code under the privileges of the agent process. This is a supply-chain exposure rather than evidence that a particular dependency is currently malicious.Attack Path
- An attacker compromises a dependency or dependency version referenced by the external
yida-publish-pagesub-skill, or causes an unsafe dependency to resolve through dependency confusion or an unpinned version range. - The agent follows the instructions in
SKILL.mdand changes into the publishing script directory. - The agent runs
npm install. - npm retrieves the attacker-controlled package and executes a malicious lifecycle script.
- The script runs with the agent's local privileges and can attempt to read project files, authentication state, source code, or modify the publishing workflow.
- The compromised workflow may subsequently deploy attacker-modified content to the authenticated YiDA application.
...[truncated 618 chars]
- An attacker compromises a dependency or dependency version referenced by the external
- Remediation
View remediation
Remediation Suggestions
- Include the complete
yida-publish-pagesub-skill and its dependency manifest in the auditable project. - Commit a lockfile containing resolved versions and integrity hashes, and use
npm ciinstead ofnpm installfor reproducible installation. - Pin all direct dependencies to reviewed versions and validate transitive dependencies with software-composition analysis.
- Use
npm ci --ignore-scriptswhen lifecycle scripts are unnecessary. If scripts are required, document and audit every script before execution. - Configure npm to use an approved registry and apply package allowlisting or provenance verification where available.
- Run installation and publishing in a sandbox with minimal filesystem and network access. Do not expose
.cache/cookies.jsonto dependency installation processes unless strictly necessary. - Separate dependency installation from authenticated publishing so that third-party installation code cannot access active YiDA session material.
- Include the complete
