T08 · Insecure Dependencies
Warning
- Location
- scripts/init-project.sh:6
- Finding
- Mutable npm Package Resolution Can Execute Unreviewed Remote Code<![CDATA[ ## Vulnerability Details **File Location**: `scripts/init-project.sh:6-13`; also referenced in `SKILL.md:19`, `SKILL.md:66`, and `SKILL.md:394` **Vulnerability Type**: Unpinned dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash PROJECT_NAME="${1:-my-monitoring-project}" echo "🚀 Creating Checkly monitoring project: $PROJECT_NAME" # Create project npm create checkly@latest "$PROJECT_NAME" -- --yes cd "$PROJECT_NAME" ``` Related Skill instructions also recommend: ```bash npm create checkly@latest ``` ### Technical Analysis The `@latest` version selector resolves at execution time rather than identifying a version that was reviewed with this Skill. `npm create` downloads and executes package initialization code, so the effective code may change after the Skill itself has been audited. The repository also relies extensively on `npx checkly`. If a trusted project-local installation is unavailable, npm behavior and local configuration may permit package retrieval before execution. An unpinned invocation therefore expands trust from the reviewed Skill to the current npm registry state, package publisher account, dependency graph, and local npm configuration. This behavior is relevant to the Skill's declared Checkly setup functionality, but using a mutable package version is not the minimum privilege or trust necessary to perform that setup. ### Attack Path 1. An attacker compromises the relevant npm publisher, package release process, registry account, or a transitive dependency. 2. The attacker publishes a malicious version that becomes the package's `latest` release. 3. A user or agent invokes `scripts/init-project.sh` or follows the documented `npm create checkly@latest` instruction. 4. npm resolves and downloads the newly published package. 5. Package initialization code executes with the invoking user's local permissions. 6. Malicious code can access files and environment variables available to that process, potentially ...[truncated 737 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed version: ```bash npm create checkly@9.3.0 "$PROJECT_NAME" -- --yes ``` 2. Record package versions and integrity data in a lockfile and use `npm ci` for established projects. 3. Prefer the project-local binary: ```bash ./node_modules/.bin/checkly test ``` or ensure `npx --no-install checkly` is used where supported. 4. Review release provenance, signatures, and npm integrity metadata before updating the pinned version. 5. Perform upgrades through a reviewed dependency-update process rather than resolving a mutable tag during routine Skill execution. 6. Run package installation with only the environment variables and filesystem access needed for initialization. ]]>
