T08 · Insecure Dependencies
- Location
SKILL.md:27- Finding
Unpinned Third-Party Dependencies Can Introduce Mutable Supply-Chain Code
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:27-28,SKILL.md:389,SKILL.md:404, andSKILL.md:473
Vulnerability Type: Unpinned and immediately executable third-party dependencies
Risk Level: MediumVulnerable Code
At lines 27-28:
bash pip install claude-agent-sdk npm install @anthropic-ai/claude-agent-sdkAt line 389:
bash npx tsx your-file.tsAt line 404:
bash npm install @anthropic-ai/claude-agent-sdkAt line 473:
bash npm install -D typescript@latestTechnical Analysis
The Skill directs users to install third-party packages without specifying reviewed, exact versions or integrity constraints. Dependency resolution therefore depends on mutable package-registry state at installation time. The explicit use of
typescript@latestguarantees that the selected package version can change over time.The
npx tsxinstruction is especially sensitive because, whentsxis not already installed locally,npxmay retrieve the currently resolved package from the registry and execute its command immediately. Package installation may also execute lifecycle scripts under the privileges of the developer running the command.No evidence shows that the named packages are currently malicious. The security defect is that the instructions do not ensure that users receive the same reviewed artifacts, leaving the workflow exposed to registry-account compromise, malicious future releases, compromised transitive dependencies, or dependency-resolution manipulation.
Attack Path
- An attacker compromises a publisher or registry account, or introduces malicious code into a future direct or transitive dependency release.
- The registry serves the compromised release under the unversioned/default range, the
latesttag, or the version dynamically selected bynpx. - A developer follows the Skill and runs one of the documented installation or
npxco ...[truncated 1033 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace unversioned package commands with exact, reviewed versions. Avoid mutable tags such as
latest. - Generate and commit ecosystem lockfiles, such as
package-lock.jsonor an equivalent npm lockfile, and a hash-locked Python requirements file. - In automated environments, use reproducible installation commands such as
npm cirather than commands that can update dependency resolution. - Install
tsxas a pinned development dependency and invoke the local locked binary instead of allowingnpxto download an unresolved package:bash npm install --save-dev --save-exact tsx@REVIEWED_VERSION npm exec --offline -- tsx your-file.ts - Pin the Claude Agent SDK and TypeScript to versions that have been reviewed and tested:
bash npm install --save-exact @anthropic-ai/claude-agent-sdk@REVIEWED_VERSION npm install --save-dev --save-exact typescript@REVIEWED_VERSION - For Python, use an exact version with verified hashes, preferably through a generated requirements file:
text claude-agent-sdk==REVIEWED_VERSION --hash=sha256:EXPECTED_HASH - Review transitive dependencies, enable registry provenance and integrity verification where available, and run dependency vulnerability scanning in CI.
- Disable package lifecycle scripts during installation where they are unnecessary, then explicitly permit only reviewed build steps.
- Execute dependency installation with least privilege and avoid exposing unrelated production secrets to development or build processes.
- Replace unversioned package commands with exact, reviewed versions. Avoid mutable tags such as
