T08 · Insecure Dependencies
- Location
SKILL.md:46- Finding
Unpinned npm Packages Are Downloaded and Executed
- Content
View full analysis
--chain-type --chain-id ``` `SKILL.md:97-102`: ```json { "dependencies": { "@sentio/sdk": "^4.0.0" }, "devDependencies": { "@sentio/cli": "^4.0.0", "typescript": "^6.0.3" } } ``` `references/sui-sdk4-migration.md:9`: ```text Bump deps to `^4.0.0`. Set `@sentio/sdk`, `@sentio/cli` (and `@sentio/action` if used) to `^4.0.0` (the `latest` npm tag is now `4.x`), then `sentio gen` to regenerate bindings. ``` ### Technical Analysis The documented `npx @sentio/cli` command may download the package version currently resolved by the configured npm registry and immediately execute its CLI. No exact version, lockfile requirement, integrity hash, or package provenance verification is specified. The recommended caret dependency ranges also permit future minor and patch releases to be installed without an explicit review. Consequently, the effective code executed by users can change after the Skill itself has been audited. Package installation may also invoke dependency lifecycle scripts. The package names are consistent with the Skill's declared Sentio development functionality, and no evidence indicates that the documented packages are currently malicious. However, allowing mutable dependency resolution exceeds the minimum privilege and reproducibility necessary to initialize or migrate a Sentio project. ### Attack Path 1. An attacker compromises the npm account, release pipeline, registry response, or transitive dependency associated with one of the documented packages. 2. The attacker publishes a malicious release that remains compatible with the unpinned command or caret range. 3. A user or AI agent follows the Skill and runs `npx @ ...[truncated 1074 chars]- Remediation
View remediation
--chain-type --chain-id ``` 2. Replace caret ranges with exact versions where reproducible builds are required: ```json { "dependencies": { "@sentio/sdk": "4.0.0" }, "devDependencies": { "@sentio/cli": "4.0.0", "typescript": "6.0.3" } } ``` 3. Commit the generated lockfile and use `npm ci` in automated or security-sensitive environments. 4. Review lockfile changes before dependency upgrades and verify that resolved packages originate from the expected registry and publisher. 5. Use npm provenance and integrity information where available. Consider registry allowlisting and dependency-scanning controls in CI. 6. Run package installation and project generation in a restricted container or sandbox without unrelated secrets, sensitive filesystem access, or unnecessary network permissions. 7. Document a controlled upgrade procedure rather than instructing users to follow a mutable `latest` tag or broad version range. ]]>
