T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:48
- Finding
- Unpinned Third-Party Python Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 48-54 **Vulnerability Type**: Unpinned third-party package installation **Risk Level**: Medium ### Vulnerable Code ```markdown ## Prerequisites 1. An iGPT API key (get one at https://igpt.ai/hub/apikeys/) 2. A connected email datasource — the user must have completed OAuth authorization via `connectors/authorize` before search will return results 3. Python >= 3.8 with the `igptai` package installed ## Setup ```bash pip install igptai ``` ``` ### Technical Analysis The setup instructions install `igptai` from PyPI without an exact version constraint or an integrity hash. Consequently, the installed code depends on whichever release the package index resolves at installation time rather than the version reviewed when this Skill was published. Python packages may execute code during installation or import. In the documented workflow, the dependency receives the `IGPT_API_KEY` and processes queries and results associated with connected email accounts. If the package publisher, distribution account, or package-index delivery chain were compromised, a malicious release could execute with the installing user's operating-system privileges. No evidence demonstrates that the current `igptai` package is malicious. The finding concerns the unsafe, non-reproducible dependency installation procedure and its supply-chain exposure. ### Attack Path 1. An attacker compromises the package publisher, its PyPI account, or another relevant distribution component. 2. The attacker publishes a malicious release under the legitimate `igptai` package name. 3. A user follows the documented `pip install igptai` command. 4. Because no version or hash is specified, `pip` resolves and installs the attacker-controlled release. 5. Malicious package code executes during installation or when imported by the documented Python workflow. 6. The code may read process-accessible se ...[truncated 750 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to an exact, reviewed version, for example `igptai==X.Y.Z`. 2. Supply and verify cryptographic hashes using a locked requirements file and `pip install --require-hashes`. 3. Generate the lock file from a trusted environment and review dependency changes before updating it. 4. Verify package provenance, publisher identity, release signatures or attestations where available, and the expected source repository. 5. Install and execute the SDK in an isolated virtual environment or container under a non-privileged account. 6. Expose only the required API credential to the process and avoid placing unrelated secrets in the same environment. 7. Use a minimally scoped, revocable API key and establish a rotation and revocation process for suspected compromise. 8. Add automated dependency scanning and controlled update review to detect compromised or vulnerable releases.
