T08 · Insecure Dependencies
- Location
scripts/audible_auth.py:19- Finding
Runtime Installation of Unpinned Third-Party Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
scripts/audible_auth.py:19-38
Vulnerability Type: Unpinned runtime dependency installation
Risk Level: MediumVulnerable Code
python def ensure_deps(): missing = [] for pkg in ["audible", "httpx"]: try: __import__(pkg) except ImportError: missing.append(pkg) if missing: print(f"Installing missing dependencies: {', '.join(missing)}...") try: subprocess.check_call( [sys.executable, "-m", "pip", "install", "--quiet"] + missing ) print("Dependencies installed.\n") except subprocess.CalledProcessError as e: print(f"ERROR: Failed to install dependencies: {e}") print(f"Run manually: pip3 install {' '.join(missing)}") sys.exit(1) ensure_deps()An equivalent dependency installation routine also appears in
scripts/audible_cli.py:27-46.Technical Analysis
Both executable scripts automatically install
audibleandhttpxfrom the Python package index when imports fail. The dependency names have no version constraints or integrity hashes, and the project contains no lockfile. Installation is performed at runtime in the active Python environment without an explicit approval step or package isolation.Consequently, the code ultimately executed by the skill can differ from the code that was audited. A compromised upstream release, package-index account, or dependency chain could introduce arbitrary code. Python package installation and import mechanisms may execute package-controlled code with the same operating-system privileges as the skill process. This is especially sensitive because the process can access locally stored Audible authentication material.
Attack Path
- An attacker compromises a declared package, one of its transitive dependencies, or its distribution channel.
- The attacker publishes a malicious release under t ...[truncated 1004 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove automatic package installation from both runtime entry points.
- Declare reviewed, exact dependency versions in a dedicated dependency manifest.
- Generate a lockfile and require package hashes, such as with pip hash-checking mode.
- Install dependencies during a separate, explicit, user-approved setup phase.
- Use a dedicated virtual environment rather than modifying the active interpreter environment.
- Review and pin transitive dependencies in addition to direct dependencies.
- Add automated dependency vulnerability and provenance scanning.
- Fail safely with installation instructions when dependencies are unavailable instead of silently installing them.
