T05 · Unauthorized Access and Privilege Escalation
- Location
oss_upload.py:20- Finding
Unrestricted Local File Upload to an External Service
- Content
View full analysis
dict: """ 上传文件到 OSS (QA环境) """ if not os.path.isfile(file_path): return {"success": False, "error": f"File not found: {file_path}"} target_url, inferred_usage = infer_route_and_usage(file_path) final_usage = usage or inferred_usage filename = os.path.basename(file_path) try: with open(file_path, "rb") as f: files = { "files": (filename, f), } data = { "usage": final_usage } ...[truncated 2104 chars]- Remediation
View remediation
