T08 · Insecure Dependencies
- Location
SKILL.md:51- Finding
Unverifiable Repository and Dependency Installation Workflow
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:51-63
Vulnerability Type: Unverified third-party source and dependency execution
Risk Level: MediumVulnerable Code
bash git clonebash cd api-generator-free npm installbash npm run generate <name>Technical Analysis
The documented installation procedure instructs users to clone a repository, install its dependencies, and run its generator. However, the
git clonecommand does not identify a repository URL, and the audited project contains no implementation,package.json, package lockfile, integrity metadata, or executable generator.Running
npm installin an externally obtained repository can execute package lifecycle scripts such aspreinstall,install, andpostinstall. Consequently, filling the missing clone source with an untrusted or incorrectly identified repository could lead to arbitrary code execution under the installing user's account.The command as currently written fails because it has no repository argument. The security risk arises when a user completes the undocumented source parameter and proceeds with the remaining installation instructions without a verifiable source or locked dependencies.
Attack Path
- A user follows the skill documentation and searches for or receives a repository URL because the documented clone URL is missing.
- An attacker supplies a malicious repository or impersonates the expected project.
- The user clones that repository and enters its directory.
- The user executes
npm install. - Malicious dependency lifecycle scripts execute with the user's privileges.
- The user runs
npm run generate, potentially executing an additional attacker-controlled payload.
Impact Assessment
Successful exploitation can provide arbitrary code execution with the privileges of the user running npm. Depending on those privileges and the local environme ...[truncated 396 chars]
- Remediation
View remediation
Remediation Suggestions
- Provide an explicit HTTPS URL for the authoritative repository.
- Document the expected repository owner, release tag, and commit hash.
- Include the actual implementation,
package.json, and lockfile in the reviewed artifact. - Require installation from a pinned, reviewed release rather than an unspecified branch.
- Use
npm ciinstead ofnpm installfor reproducible installation. - Initially install with
npm ci --ignore-scriptsunless lifecycle scripts are necessary and have been reviewed. - Publish checksums or signed release artifacts and provide instructions for verifying them.
- Ensure the generator runs as an unprivileged user in an isolated working directory.
