T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:40
- Finding
- Unpinned Third-Party Package Installation Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:40-45` (also repeated at `SKILL.md:92-97` and `SKILL.md:351-354`) **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code ```bash pip install memic export MEMIC_API_KEY=mk_your_key_here ``` The installation command is repeated later: ```bash pip install memic ``` The resource section also recommends the same unpinned installation: ```markdown - **SDK**: `pip install memic` | https://pypi.org/project/memic/ ``` ### Technical Analysis The Skill instructs users to install the latest version of the `memic` package from PyPI without pinning an audited version or verifying a cryptographic hash. Package installation and subsequent package imports can execute code with the privileges of the Python environment or user performing the installation. The Skill metadata declares version `0.3.0`, but the installation command does not constrain the Python package to that version. As a result, the effective implementation can change after the Skill has been reviewed. A compromised upstream publisher account, malicious future release, or compromised package distribution channel could cause users to install code that was never included in this audit. No evidence establishes that the current `memic` package is malicious. The vulnerability is the unsafe and non-reproducible dependency installation practice. ### Attack Path 1. An attacker compromises the upstream package publisher account, release pipeline, or package distribution channel. 2. The attacker publishes a malicious version under the existing `memic` package name. 3. A user follows the documented `pip install memic` instruction. 4. The package manager resolves and installs the attacker-controlled release because no version or hash is specified. 5. Malicious code executes during installation, import, or SDK use with the privileges of the invoking user or application. 6. The malicious package may access `M ...[truncated 845 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a specifically reviewed release that corresponds to the Skill version: ```bash python -m pip install "memic==0.3.0" ``` 2. Publish and verify cryptographic hashes through a requirements file: ```text memic==0.3.0 \ --hash=sha256:<verified-distribution-hash> ``` Install it with: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Lock all transitive dependencies using a reviewed lock file rather than resolving unrestricted versions at installation time. 4. Keep the dependency pin synchronized with the Skill metadata and repeat the pinned command consistently at every installation reference. 5. Review release provenance, package ownership, and source repository tags before updating the pinned version. 6. Install and run the SDK in an isolated virtual environment or container under a non-privileged account. 7. Provide the minimum required environment variables to the process and avoid colocating unrelated credentials in the same runtime. ]]>
