T08 · Insecure Dependencies
- Location
scripts/vod_auto_upgrade.py:44- Finding
Automatic Runtime Installation of Unpinned Dependencies
- Content
View full analysis
=3.1.107", "requests>=2.31.0"] """ cmd = [sys.executable, "-m", "pip", "install", "--upgrade", "--quiet"] + specs print(f"⏳ Auto-installing/upgrading missing dependencies: {', '.join(specs)}", file=sys.stderr) result = subprocess.run(cmd, capture_output=True, text=True) if result.returncode != 0: print( f"❌ Auto-install failed, please run manually:\n" f" python3 -m pip install --upgrade {' '.join(repr(s) for s in specs)}\n" f" Error: {result.stderr.strip()}", file=sys.stderr, ) sys.exit(1) print("✅ Install complete", file=sys.stderr) def check_sdk_version(): """Check all dependencies in requirements.txt; auto-install/upgrade if missing or too old.""" to_install = [] for pkg_name, min_ver in _DEPENDENCIES: min_ver_str = ".".join(map(str, min_ver)) if min_ver else None spec = f"{pkg_name}>={min_ver_str}" if min_ver_str else pkg_name try: installed_ver = _pkg_version(pkg_name) except PackageNotFoundError: print(f"⚠️ {pkg_name} not installed", file=sys.stderr) to_install.append(spec) continue if min_ver and _ver_tuple(installed_ver) < min_ver: print( f"⚠️ {pkg_name} version too low: {i ...[truncated 2754 chars]- Remediation
View remediation
