T08 · Insecure Dependencies
- Location
internet-archive.py:64- Finding
Unpinned Third-Party Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
internet-archive.py:64-76
Vulnerability Type: Supply-chain risk from unpinned dependency installation
Risk Level: MediumVulnerable Code
python def install_ia() -> Dict[str, Any]: """Install the ia CLI using uv, pipx, or pip.""" methods = [ ['uv', 'tool', 'install', 'internetarchive'], ['pipx', 'install', 'internetarchive'], ['pip', 'install', 'internetarchive'] ] for method in methods: try: result = subprocess.run(method, capture_output=True, text=True, timeout=120) if result.returncode == 0: return {Technical Analysis
The
installintent invokesuv,pipx, orpipto install the latest version of theinternetarchivepackage. It does not pin an audited version, verify package hashes or signatures, or enforce a trusted package index.Package resolution may therefore change after the skill has been reviewed. These package managers may also honor user- or system-level index configuration, including environment variables and configuration files that redirect resolution to a custom mirror. Although subprocess arguments are passed as an array and do not create shell-command injection, the downloaded package remains executable third-party code whose provenance is not sufficiently constrained.
Attack Path
- An attacker compromises the upstream package, an available release, a configured package mirror, or the local package-manager index configuration.
- A user or agent invokes the skill's
installintent. - The script attempts
uv tool install internetarchive, thenpipx install internetarchive, and finallypip install internetarchive. - A package manager resolves and downloads the attacker-controlled package version from its configured source.
- Package installation or subsequent execution of the installed
iacommand runs attacker-controlled code with the privileges of the user ...[truncated 453 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
internetarchiveto a specifically reviewed version rather than installing the latest available release. - Use cryptographic hash verification for the package and all transitive dependencies where the selected package manager supports it.
- Require resolution from an explicitly approved HTTPS package index instead of implicitly trusting environment- or system-configured indexes.
- Maintain a reviewed lock file or constraints file containing exact transitive dependency versions.
- Install the package in an isolated virtual environment with the minimum necessary permissions.
- Require explicit user confirmation before initiating network retrieval and installation.
- Treat package installation failure as a hard failure rather than silently falling back across package managers with potentially different trust configurations.
- Periodically update the pinned version only after reviewing release provenance, dependency changes, and published security advisories.
- Pin
