T08 · Insecure Dependencies
Error
- Location
- SKILL.md:20
- Finding
- Unpinned Global npm Dependency Captures an Authenticated Foodpanda Session<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 20–24 and 47–53 **Vulnerability Type**: Unreviewable third-party dependency with access to authentication credentials **Risk Level**: High ### Vulnerable Code ```markdown Ensure Node.js 18+ and npm are available, then install globally: ```bash npm install -g foodpanda-cli ``` ``` ```markdown ### 2. Log in Opens a browser window for the user to log in to their foodpanda account. The session token is captured automatically. This step requires user interaction. ```bash foodpanda-cli login ``` ``` ### Technical Analysis The Skill directs users to install `foodpanda-cli` globally from the npm registry without pinning an exact package version or specifying a verified integrity hash, trusted source repository, or package provenance. The project contains only `SKILL.md`; consequently, the installed package's implementation, npm lifecycle scripts, credential handling, and ordering behavior cannot be audited from the submitted artifact. A global npm installation may execute package lifecycle scripts and places an executable in the user's global command path. The same unreviewed executable is subsequently allowed to open a browser and capture an authenticated Foodpanda session token. This combines supply-chain code execution risk with access to a sensitive account credential and a real-money ordering function. This finding does not establish that the current npm package is malicious. The vulnerability is the unsafe trust model: a compromised maintainer account, malicious future release, package replacement, or registry compromise could alter the installed code after this Skill has been reviewed. ### Attack Path 1. An attacker compromises the npm publisher, the package distribution channel, or a future `foodpanda-cli` release. 2. The attacker publishes a modified package containing malicious installation or runtime behavior. 3. A user follows the Skill and executes `npm install -g foodpanda- ...[truncated 1349 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Include the CLI's complete auditable source code in the reviewed project, or provide a verifiable reference to its exact source revision. 2. Pin installation to a specific reviewed package version rather than installing the latest mutable release. 3. Record and verify package integrity data, registry provenance, and publisher identity before installation. 4. Prefer a project-local installation over a global installation to reduce command-path exposure and simplify isolation. 5. Review all transitive dependencies and npm lifecycle scripts. Disable lifecycle scripts during installation where operationally feasible. 6. Run the CLI in a restricted environment with minimal filesystem, process, network, and environment-variable access. 7. Document how session tokens are captured, transmitted, stored, protected, expired, and deleted. Tokens should use restrictive file permissions and must never be logged or exposed through command output. 8. Restrict token transmission to verified Foodpanda endpoints and provide a clear logout or credential-revocation procedure. 9. Require explicit user confirmation immediately before placing an order, tied to an immutable preview containing the restaurant, items, delivery address, fees, total, and payment method. 10. Add release signing, reproducible-build evidence, automated dependency scanning, and continuous monitoring for publisher or package ownership changes. ]]>
