T08 · Insecure Dependencies
- Location
README_EN.md:35- Finding
Unpinned Third-Party Python Dependencies Create Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Locations:
README_EN.md:35-36README.md:35-36hmr-memory/README_EN.md:35-36hmr-memory/README.md:35-36
Vulnerability Type: Unpinned third-party dependencies
Risk Level: MediumVulnerable Code:
bash # Get HMR (https://github.com/snowfoxHQ/HMR) pip install pydantic numpy fastapi uvicornTechnical Analysis
The documented installation command installs four packages without exact version constraints, integrity hashes, or a lockfile. Consequently, package resolution depends on whichever releases and transitive dependencies are available from the configured Python package index at installation time.
This makes installation non-reproducible and allows the reviewed dependency set to change without changes to this repository. If a named package, transitive dependency, package-index account, or configured package source is compromised, users following the instructions could install attacker-controlled code that was not included in this audit.
The comment also states that the command obtains HMR, while the command only installs general Python dependencies. It does not retrieve a pinned or verifiable version of the HMR service itself. The runtime service implementation is absent from this project and therefore falls outside the audited code boundary.
Attack Path
- An attacker compromises a named dependency, one of its transitive dependencies, or a package source used by the victim.
- The attacker publishes a malicious release that remains compatible with the unconstrained package names.
- A user follows the documented
pip install pydantic numpy fastapi uvicorncommand. - Pip resolves and installs the malicious or compromised release because no version or hash restrictions prevent it.
- Attacker-controlled code may execute during package installation or later when the HMR service imports the affected package.
- The malicious dependency the ...[truncated 919 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace unconstrained package names with exact, reviewed versions in a dedicated requirements or lock file.
- Generate and verify cryptographic hashes for every direct and transitive dependency, then install with:
bash pip install --require-hashes -r requirements.txt - Use a reproducible dependency-management workflow such as
pip-tools, Poetry, or an equivalent lockfile-based system. - Review dependency updates before regenerating the lockfile, including transitive changes and package provenance.
- Obtain the HMR service from an explicitly documented release tag or immutable commit, and provide a checksum or signature-verification procedure.
- Correct the documentation so it distinguishes installing Python dependencies from obtaining the HMR service.
- Run the service in a dedicated, unprivileged virtual environment or container with restricted filesystem and network access.
- Apply the same corrected installation instructions to all four duplicated README files to prevent users from following an outdated unsafe command.
