T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:8
- Finding
- Unpinned Third-Party npm Package Installed Globally<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 8-18 and 29-34 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```yaml "requires": { "bins": ["openfun"] }, "install": [ { "id": "node", "kind": "node", "package": "openfun-cli", "bins": ["openfun"], "label": "Install OpenFun CLI (npm)", }, ], ``` ```bash npm install -g openfun-cli openfun login ``` ### Technical Analysis The Skill instructs users or agents to install `openfun-cli` globally from npm without pinning an exact version, verifying package integrity, identifying an approved publisher, or reviewing the package implementation. The executable source is not included in the audited project, so its installation scripts and runtime behavior cannot be verified from the available artifact. An npm package may execute lifecycle scripts during installation. A global installation also exposes its command system-wide for the current environment. Consequently, a compromised publisher account, malicious future release, registry substitution, or dependency-chain compromise could cause attacker-controlled code to execute with the privileges of the user performing the installation. The CLI is subsequently used for browser-based authentication, and the documentation states that its token persists in `~/.openfun/config.json`. If the installed package or one of its executable dependencies were compromised, it could potentially access that token and other files available to the user. The audit found no evidence that the current package is malicious; the finding concerns the unsafe, unverified dependency acquisition process. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or a transitive dependency and publishes a malicious release. 2. An agent or user follows the Skill instructions and runs `npm install -g openfun-cli` without a pinned version or integrity constraint. 3. ...[truncated 1414 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `openfun-cli` to a specifically reviewed version rather than resolving the latest release: ```bash npm install --global openfun-cli@<reviewed-version> ``` 2. Record and verify package provenance, including the expected npm registry, package publisher, source repository, release signature, and integrity digest. 3. Include a lockfile or equivalent integrity-controlled installation manifest where the Skill platform supports it. 4. Prefer a project-local or isolated installation over a global installation so the executable does not affect unrelated projects or sessions. 5. Audit the package source, npm lifecycle scripts, and transitive dependencies before allowing automated installation or execution. 6. Disable lifecycle scripts during installation when they are not required: ```bash npm install --global --ignore-scripts openfun-cli@<reviewed-version> ``` If lifecycle scripts are required, review and explicitly approve them instead. 7. Run the CLI in a sandbox or restricted account with access only to the directories and network destinations required for video generation. 8. Ensure `~/.openfun/config.json` is created with owner-only permissions, avoid exposing it in logs or backups, and provide a documented token-revocation procedure. 9. Revalidate package integrity and security before updating the pinned version. ]]>
