T08 · Insecure Dependencies
- Location
SKILL.md:49- Finding
Unpinned Third-Party Package Execution via npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:49
Vulnerability Type: Unsafe execution of an unpinned third-party dependency
Risk Level: MediumVulnerable Code
bash npx get-graphql-schema http://localhost:4000/graphql > schema.jsonThe same command is repeated in generated guidance at
SKILL.md:97.Technical Analysis
The documented command invokes
get-graphql-schemathroughnpxwithout specifying a package version, lockfile, integrity hash, or trusted package source. If the package is not already available locally,npxmay retrieve it and execute its code with the invoking user's permissions.Although the GraphQL endpoint is limited to
localhost, that restriction applies only to the command's intended schema request. It does not restrict the downloaded package or its transitive dependencies. Package code can access files, environment variables, credentials available to the user, local network services, and external network destinations.This is unnecessary for the Skill's declared local static-analysis functionality. Users can provide an existing SDL or introspection JSON file, or the documentation can require a pinned and reviewed local dependency.
Attack Path
- An attacker compromises, replaces, or otherwise gains control over the referenced npm package or one of its transitive dependencies.
- A user follows the Skill's documented
npx get-graphql-schemainstruction. npxresolves and downloads the currently published, unpinned package code.- The retrieved package or dependency executes with the user's privileges.
- Malicious code can read accessible project data or credentials, execute commands, modify files, or transmit information over the network.
Impact Assessment
Successful exploitation would provide code execution under the account running the command. The accessible scope may include the current project, other user-readable files, environment va ...[truncated 502 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not recommend dynamically executing an unversioned package through
npx. - Pin a reviewed package version as a project development dependency and commit the package manifest and lockfile.
- Invoke the installed local binary in a way that prohibits fallback downloads, such as
npx --no-install, after verifying the package is installed. - Use package-manager integrity verification and automated dependency scanning.
- Prefer a GraphQL server's built-in schema export or introspection mechanism where practical, avoiding dynamically retrieved executable tooling.
- Clearly inform users that introspection output may reveal sensitive schema metadata and should remain local unless they explicitly authorize disclosure.
- Apply the same correction to the repeated command at
SKILL.md:97.
- Do not recommend dynamically executing an unversioned package through
