T08 · Insecure Dependencies
- Location
SKILL.md:13- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 13-17
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: Mediumyaml install: - id: npm-sdk kind: command command: "npm install -g @whop/sdk" label: "Install Whop SDK"Technical Analysis
The skill instructs the environment to install the latest available version of
@whop/sdkglobally. No exact version or package-integrity value is specified, so the code installed at runtime can differ from the code that was present when the skill was audited.npm installation may execute package lifecycle scripts, including scripts supplied by transitive dependencies. A compromised package release, compromised maintainer account, or malicious transitive dependency could therefore execute code with the privileges of the user running the installation. The
-goption also expands the installation scope beyond the project and may require elevated privileges on some systems.This finding represents supply-chain exposure; the audited file does not establish that the current
@whop/sdkpackage is malicious.Attack Path
- An attacker compromises the npm package, a maintainer account, or a transitive dependency and publishes a malicious version.
- The skill installation command resolves
@whop/sdkwithout a version constraint and retrieves the attacker-controlled release. - npm executes any malicious lifecycle script during installation, or the malicious library code executes when imported.
- The payload operates with the installing user's privileges and can access data and credentials available to that process, potentially including
WHOP_API_KEYandWHOP_COMPANY_ID. - Because the package is installed globally, modified files or executables may affect other projects or users of the same runtime environment, subject to filesystem permissions.
Impact Assessment
Successful exploitation co ...[truncated 508 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version, for example
@whop/sdk@X.Y.Z, rather than resolving the latest release. - Prefer a project-local dependency and a committed lockfile over
npm install -g. - Use
npm ciwith a reviewed lockfile in automated environments to obtain deterministic dependency resolution. - Verify package provenance and registry configuration, and enforce lockfile integrity hashes.
- Review direct and transitive dependencies before upgrades; use dependency scanning and allowlisting where practical.
- Run installation as a dedicated, unprivileged user in an isolated environment with no production credentials present.
- Where compatible with the package, suppress lifecycle scripts during installation with
--ignore-scripts; explicitly review and separately run any scripts that are genuinely required. - Avoid exposing
WHOP_API_KEYandWHOP_COMPANY_IDto dependency installation processes, and grant the API key only the minimum permissions required.
- Pin the dependency to an exact, reviewed version, for example
