T08 · Insecure Dependencies
- Location
references/calendar_time.md:320- Finding
Unpinned Third-Party Python Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
references/calendar_time.md, lines 320–325
Vulnerability Type: Unpinned package installation from a public package repository
Risk Level: MediumVulnerable Code
python # pip install lunarcalendar from lunarcalendar import ConverterTechnical Analysis
The reference directs the agent or user to install
lunarcalendarwithout specifying an approved version, cryptographic hash, lockfile, or trusted package index. Consequently, package resolution may select whichever release is current at installation time rather than the release originally reviewed.Python packages can execute code during installation and whenever imported. If the package name, maintainer account, distribution channel, or a future release were compromised, the installed payload could execute with the privileges of the agent or user running
pipand Python.No evidence establishes that the current
lunarcalendarpackage is malicious. The vulnerability is the uncontrolled supply-chain trust introduced by the installation instruction.Attack Path
- A user requests lunar-calendar or sexagenary-cycle conversion.
- The agent consults
references/calendar_time.md. - The agent or user follows the unpinned
pip install lunarcalendarinstruction. - The package manager retrieves the current package and transitive dependencies from its configured index.
- A compromised, substituted, or malicious future package release executes code during installation or import.
- The payload operates with the permissions available to the Python process.
Impact Assessment
Successful exploitation could allow arbitrary code execution within the agent's Python environment. The accessible scope would depend on the runtime sandbox and could include:
- Reading or modifying files accessible to the installing user.
- Accessing environment variables and process-level secrets.
- Making network requests when outbound access is permitted.
...[truncated 295 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a reviewed version using an exact version constraint.
- Maintain a lockfile containing all resolved transitive dependency versions.
- Require package hashes and install with hash verification enabled.
- Use an explicitly configured, trusted package index or an internally reviewed mirror.
- Require explicit user approval before installing any package.
- Install dependencies in an isolated, least-privileged virtual environment or container.
- Remove network and sensitive-file access from the conversion runtime where possible.
- Prefer audited, vendored conversion logic if the dependency is small enough to maintain safely.
- Add documented verification and update procedures so dependency changes receive security review.
