T09 · Insecure Skill Coding Practices
- Location
scripts/cve_checker.py:136- Finding
Unvalidated Remote Download Metadata Enables Path Traversal and Arbitrary URL Fetching
- Content
View full analysis
0: patch_item = patch_data["deb"][0] elif patch_data.get("oup") and len(patch_data["oup"]) > 0: patch_item = patch_data["oup"][0] # Handle patch as a list (old format) elif isinstance(patch_data, list) and len(patch_data) > 0: patch_item = patch_data[0] if patch_item: # Attempt to obtain url or download_url download_url = patch_item.get("url") or patch_item.get("download_url") download_pkg_name = patch_item.get("source") # If source is empty but download_url exists, extract the filename if not download_pkg_name and download_url: parsed = urlparse(download_url) path = parsed.path if path: filename = os.path.basename(path) if filename: download_pkg_name = filename else: download_pkg_name = f"patch_{arch}.bin" else: download_pkg_name = f"patch_{arch}.bin" if not download_url or not download_pkg_name: print(f"警告: 在 {pkg} 中缺少下载URL或包名,跳过下载。") continue # Create the architecture-specific directory ...[truncated 4718 chars]- Remediation
View remediation
