other
- Location
scripts/generate_ppt.py:1185- Finding
Insufficiently Disclosed Transmission of Prompts and Local Presentation Contents
- Content
View full analysis
str: """根据 flow 类型组装最小输入 prompt""" if flow_config.get("category") != "edit": return user_prompt sections = [f"## 当前问题\n{user_prompt.strip()}"] if operations.strip(): sections.append(f"## 操作说明\n{operations.strip()}") if current_ppt.strip() or size.strip(): ppt_section = [] if size.strip(): ppt_section.append(f"当前PPT的尺寸为 {size.strip()}") if current_ppt.strip(): ppt_section.append(current_ppt.strip()) sections.append("## 当前PPT\n" + "\n".join(ppt_section)) return "\n\n".join(sections).strip() ``` ```python final_prompt = build_prompt(flow_config, prompt, current_ppt=current_ppt, operations=operations, size=size) request_id = uuid.uuid4().hex headers = { "Request-Id": request_id, "Content-Type": "application/json", } if api_key: headers["Qid"] = api_key payload = { "ai_agent_flow_id": flow_config["flow_id"], "prompt": final_prompt, "kwargs": dict(flow_config.get("kwargs", {})), } ``` ```python with requests.post( API_URL, headers=headers, json=payload, stream=True, timeout=TIMEOUT_SECONDS, ) as response: ``` ```python def _load_current_ppt_input(value: str) -> str: if not value: return "" expanded = os.path.expanduser(value) if os.path.isfile(expanded): with open(expanded, "r", encoding="utf-8") as f: return f.read().strip() return value.strip() ``` ### Technical Analysis The script is a client for a cloud-based PPT service rather than a local presentation generator. It r ...[truncated 2454 chars]- Remediation
View remediation
