T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:31
- Finding
- Unpinned Third-Party Package Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:31-34` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```bash python3 -m pip install --user pipx python3 -m pipx ensurepath pipx install bing-webmaster-cli bwm --version ``` ### Technical Analysis The installation instructions retrieve `pipx` and `bing-webmaster-cli` from the default Python package registry without pinning reviewed versions or verifying artifact hashes. Consequently, the code installed and executed can change after the skill has been audited. This is particularly sensitive because the installed `bwm` CLI is subsequently instructed to receive a Bing Webmaster API key through an environment variable, command-line option, interactive input, or local credential file. A compromised, malicious, or unexpectedly modified package release could access that credential and perform operations under the permissions granted to the associated Bing Webmaster account. The document does not contain a malicious dependency or demonstrate that the named packages are currently compromised. The vulnerability is the absence of dependency integrity and version controls at a trust boundary where installed code later handles credentials. ### Attack Path 1. An attacker compromises a relevant package, distribution account, registry delivery path, or future package release. 2. A user follows the documented installation commands. 3. `pip` or `pipx` resolves and installs the attacker-controlled package version because no reviewed version or cryptographic hash is required. 4. Installation hooks or runtime package code execute with the privileges of the invoking user. 5. When the user authenticates, the compromised CLI reads the supplied API key from input, environment variables, or its documented credential storage. 6. The attacker can exfiltrate the key or issue unauthorized Bing Webmaster API requests within the key's permissions. ### Impact Assessment Suc ...[truncated 593 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `pipx` and `bing-webmaster-cli` to explicitly reviewed versions rather than installing the latest available releases. 2. Install from a lockfile or requirements file containing cryptographic hashes, using hash enforcement where supported. 3. Publish and document the authoritative package registry, source repository, release-signing process, and expected package identity. 4. Prefer reproducible builds and verify downloaded artifacts against trusted checksums or signatures before installation. 5. Review package metadata and source for each approved release before updating the pinned version. 6. Run the CLI as a non-privileged user and isolate it in a dedicated environment. 7. Grant the Bing API key only the minimum account access needed, rotate it after suspected compromise, and avoid exposing it through command-line arguments where it may enter shell history or process listings. 8. Validate and restrict `BWM_API_BASE_URL` so credentials cannot be redirected to an untrusted endpoint through accidental or malicious configuration. ]]>
