飞书群Webhook发送图片
上传本地图片到飞书并通过 webhook 发送到群。使用方式:python send_image.py <图片路径>
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 119 · 0 current installs · 0 all-time installs
byBING@imBing
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description, SKILL.md, and code all match: the script needs APP_ID, APP_SECRET and a WEBHOOK_URL to upload an image to Feishu and send it to a group. There are no unrelated credentials, binaries, or unexpected capabilities requested.
Instruction Scope
Runtime instructions are limited and specific: create config.py from the template, install the requests package, and run python send_image.py <image_path>. The code reads only the local image file and the local config.py and makes network calls to Feishu's official API (open.feishu.cn) and to the user-provided webhook URL. It does not access other system files, env vars, or external endpoints.
Install Mechanism
No install spec included; this is instruction-only with two small Python files. The only dependency is requests (installed via pip), which is proportional to the task and low risk.
Credentials
The only secrets/configuration required are APP_ID, APP_SECRET, and WEBHOOK_URL, which are necessary for Feishu API access and webhook posting. These are declared in the config template and used by the code; the request for them is proportional. Note: APP_SECRET is sensitive and stored in plaintext in config.py.
Persistence & Privilege
The skill does not request persistent/always-on privileges, does not modify other skills or global configs, and is user-invocable only. It does not perform autonomous background actions beyond the one-shot run.
Assessment
This skill appears to do exactly what it says. Before installing/running: 1) Only supply APP_ID and APP_SECRET for an app you control; keep config.py private and do not commit it to repos. 2) Verify the WEBHOOK_URL is the official Feishu group webhook you intend to use (the webhook could be any URL you provide). 3) Test with non-sensitive images first. 4) Install the requests package in a controlled environment (consider a virtualenv) and pin versions if you need reproducible installs. If you need higher assurance, inspect or run the script locally rather than trusting a remote run.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
飞书图片 Webhook 技能
将本地图片上传到飞书,然后通过 webhook 发送到群。
安装配置
1. 配置参数
复制配置模板并填入您的实际配置:
cp config.example.py config.py
询问一下参数并跟新到 config.py 文件:
APP_ID = "cli_xxx" # 飞书应用 ID
APP_SECRET = "xxx" # 飞书应用密钥
WEBHOOK_URL = "https://open.feishu.cn/open-apis/bot/v2/hook/xxx" # 群机器人 Webhook 地址
2. 安装依赖
pip install requests
使用方式
python send_image.py <图片路径>
示例:
python send_image.py /Users/xxx/Desktop/test.png
python send_image.py ~/Pictures/photo.jpg
工作流程
- 上传图片到飞书,获取 image_key
- 通过 webhook 发送图片到群
注意事项
- 图片格式支持:jpg、png、gif
- 需要确保飞书应用有
im:image权限 - webhook 地址需要群机器人配置正确
- 请勿将 config.py 文件提交到公开仓库
Files
4 totalSelect a file
Select a file to preview.
Comments
Loading comments…
