T08 · Insecure Dependencies
Warning
- Location
- references/setup.md:4
- Finding
- Unpinned Installation of a Privileged Third-Party CLI Package## Vulnerability Details **File Location**: `references/setup.md:4-5` and `SKILL.md:19-24` **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code From `references/setup.md:4-5`: ```bash pipx install kroget # or: pip install kroget ``` From `SKILL.md:19-24`: ```text Quick version: 1. `pipx install kroget` 2. Register app at developer.kroger.com → get client_id + client_secret 3. `kroget setup --client-id ... --client-secret ...` 4. `kroget auth login` → user authorizes in browser 5. Look up store: `kroget products search "test" --location-id <zip>` ``` ### Technical Analysis The setup instructions install `kroget` from a third-party package repository without pinning a reviewed version or verifying an artifact hash. Consequently, the code executed by these commands can change independently of the audited Skill. This dependency is subsequently entrusted with sensitive Kroger API client credentials and OAuth tokens stored under `~/.kroget/`. It is also authorized to search account-specific inventory and modify the user's grocery cart. If the upstream package, maintainer account, release pipeline, or package-distribution channel were compromised, a malicious release could execute during installation or command invocation with the user's local operating-system privileges. The audit found no evidence that the currently referenced project or package is malicious. The vulnerability is the absence of controls that bind installation to a specific reviewed artifact. ### Attack Path 1. An attacker compromises the upstream package publisher, release pipeline, or package repository and publishes a malicious `kroget` release. 2. A user follows the Skill instructions and runs `pipx install kroget` or `pip install kroget`. 3. Because no version or integrity hash is specified, the package manager retrieves the attacker-controlled release. 4. The maliciou ...[truncated 988 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `kroget` to an explicitly reviewed version rather than installing the latest release: ```bash pipx install "kroget==REVIEWED_VERSION" ``` 2. Publish the expected package version and cryptographic artifact hash in the setup documentation. 3. Use a hash-locked requirements file or equivalent reproducible installation mechanism for the package and its transitive dependencies. 4. Verify the package publisher, source repository, release signature, and build provenance before updating the pinned version. 5. Prefer `pipx` over a global `pip` installation to isolate the CLI in a dedicated environment. 6. Review each dependency update before changing the pin, and document the reviewed source revision corresponding to the release. 7. Grant only the minimum Kroger OAuth scopes required for product lookup and cart modification. 8. Revoke and rotate Kroger OAuth tokens and API credentials immediately if dependency compromise is suspected.
