转发 Markdown 可触发远程下载并把取得的内容上传到飞书
原文依据:4 处Skill 要求转发文档时保留原始文本并用 --markdown 发送;发送器会解析远程 Markdown 图片 URL,先下载再上传。可见规则没有限制目标主机、私网地址或重定向。
恶意或被篡改的文档只需嵌入图片 URL,就可能让运行 lark-cli 的环境访问攻击者跟踪地址或内部 HTTP 资源,并把成功取得的图片内容上传到飞书消息中。
在转发飞书文档时,Skill 要求保留原始 Markdown;发送路径会解析其中的远程图片 URL,下载后再上传到飞书。若文档包含不可信图片链接,执行发送会让本机访问该地址并把响应作为图片上传。可见规则未给出主机、私网地址或重定向限制。用户可要求只允许可信 HTTPS 域名,或在转发前移除/预览远程图片。发送本身仍要求用户明确批准。
When sending content fetched from a Lark doc as a message, fetch the doc with --doc-format im-markdown, then send it as a message using the --markdown format. The fetched content is already in markdown; in any content-forwarding scenario, keep the fetched original text and send it in the --markdown format. Note: if the doc contains a cite tag with type="user", keep it as-is and do not strip the tag.查看另外 3 个位置
The shortcut does all of the following before sending:1. Forces `msg_type=post`2. Resolves remote Markdown images like `` by downloading and uploading them first3. Normalizes the Markdown for Feishu post rendering4. Wraps the result as:- Already-uploaded `img_xxx` image keys are the most reliable Markdown image input.- Local paths in Markdown image syntax like `` are **not** supported and will not be auto-uploaded.- Remote URLs (`https://...`) will be auto-downloaded and uploaded at runtime; if the download or upload fails, the image is removed with a warning.Messages sent by this tool are visible to other people. Before calling it, you **must** confirm with the user:1. The recipient (which person or which group)2. The message content3. The sending identity (user or bot)**Do not** send messages without explicit user approval.