T08 · Insecure Dependencies
- Location
SKILL.md:42- Finding
Unpinned npm Dependencies Create Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 42
Vulnerability Type: Unpinned third-party dependencies
Risk Level: MediumVulnerable Code
markdown | **Vercel AI SDK** | `npm install @kyma-api/ai-sdk ai` | `import { createKyma } from "@kyma-api/ai-sdk"; const kyma = createKyma({ apiKey: "kyma-your-api-key" })`, or set `KYMA_API_KEY` and import the default `kyma` export; pick a model with `kyma("<model id>")` | none, use `usecase=coding` |Technical Analysis
The documented installation command does not pin reviewed versions of
@kyma-api/ai-sdkorai. Consequently, npm resolves versions from mutable package registry state at installation time.A later release could contain compromised runtime logic or npm lifecycle scripts. Such scripts may execute during installation with the privileges of the user running npm. The absence of explicit versions also reduces reproducibility and can expose users to unexpected security regressions or breaking changes.
The audit found no evidence that the currently referenced packages are malicious. This finding concerns the unsafe dependency-resolution practice and resulting exposure to future supply-chain compromise.
Attack Path
- An attacker compromises the publisher account, release process, or registry distribution path of either referenced package.
- The attacker publishes a malicious version that satisfies npm's implicit latest-version resolution.
- A user follows the skill instruction and runs
npm install @kyma-api/ai-sdk ai. - npm downloads the attacker-controlled release.
- Malicious lifecycle code may execute during installation, or malicious package logic may execute when the application imports or invokes the dependency.
- The payload runs within the installing user's account and may access resources available to that user or application.
Impact Assessment
Successful exploitation could execute arbitrary code with the privileges of the user performing th ...[truncated 434 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin both dependencies to specific, reviewed versions, for example:
bash npm install --save-exact @kyma-api/ai-sdk@<reviewed-version> ai@<reviewed-version>- Do not substitute arbitrary version numbers; select versions only after reviewing their provenance, release contents, and security status.
- Generate and retain a lockfile so transitive dependency resolution is reproducible.
- Use
npm ciin automated or production installation workflows to enforce the lockfile. - Enable package integrity and provenance verification where supported.
- Audit dependency trees and lifecycle scripts before upgrades.
- Consider installing with lifecycle scripts disabled during assessment using
npm install --ignore-scripts, when compatible with the packages. - Automate vulnerability scanning and require review before dependency updates are accepted.
