Suspicious — Risk Score 42/100
Last scan:8 hr ago Rescan
42 /100
feishu-ops
飞书文档与消息操作技能
发现多个本地文件操作脚本未在SKILL.md中声明,存在文档-行为不符的影子功能问题,且包含硬编码用户路径的开发遗留代码。
Skill Namefeishu-ops
Duration45.7s
Enginepi
Use with caution
1) 清理所有硬编码用户路径的开发遗留代码;2) 将本地文件操作脚本从技能包中移除或补充完整文档声明;3) 添加明确的权限声明说明 filesystem:READ/WRITE 用途

Findings 6 items

Severity Finding Location
High
影子功能:本地桌面文件操作未在文档声明 Doc Mismatch
scripts/fix_xlsx_encoding.py 和 scripts/rebuild_xlsx.py 执行本地桌面 xlsx 文件读取/修改,但 SKILL.md 完全没有提及本地文件操作功能,只描述了飞书云端文档操作
desktop = os.path.join(os.environ['USERPROFILE'], 'Desktop')
→ 如需保留本地文件操作能力,必须在 SKILL.md 中明确声明 filesystem:WRITE 权限及用途
scripts/fix_xlsx_encoding.py:2
High
硬编码用户敏感路径 Sensitive Access
多个脚本硬编码了开发者的完整用户路径 C:/Users/10430/,包含 .openclaw 配置目录和 Desktop 目录结构,存在信息泄露风险
filepath = os.path.join(desktop, filename)  # desktop = C:/Users/10430/Desktop
→ 移除所有硬编码用户路径,改用相对路径或配置文件管理
scripts/fix_xlsx_encoding.py:8
High
遍历用户桌面查找文件 Sensitive Access
fix_xlsx_encoding.py 遍历用户桌面目录,通过文件大小匹配查找目标 xlsx 文件,具有情报收集特征
matching = [(f, os.path.getsize(os.path.join(desktop, f))) for f in os.listdir(desktop) if f.endswith('.xlsx')...]
→ 此功能应明确声明或移除
scripts/fix_xlsx_encoding.py:3
Medium
第三方依赖无版本锁定 Supply Chain
lark-oapi 和 openpyxl 未在 requirements.txt 或代码中指定版本范围,可能引入供应链风险
pip install lark-oapi
→ 创建 requirements.txt 并锁定版本,如 lark-oapi>=1.0.0,<2.0.0
SKILL.md:97
Medium
凭证文件路径硬编码 Credential Theft
多处脚本硬编码读取凭证配置路径 C:/Users/10430/.openclaw/workspace/skills/feishu-ops/scripts/config.json
config = json.load(open('C:/Users/10430/.openclaw/workspace/skills/feishu-ops/scripts/config.json'...)
→ 使用相对路径或环境变量管理凭证路径
scripts/rebuild_xlsx.py:52
Low
权限声明缺失 Priv Escalation
SKILL.md 未声明 allowed_tools,filesystem 和 network 权限的使用场景不透明
--- name: feishu-ops ...
→ 在 SKILL.md 开头添加 allowed_tools 声明
SKILL.md:1
ResourceDeclaredInferredStatusEvidence
Filesystem NONE WRITE ✗ Violation scripts/fix_xlsx_encoding.py:2, scripts/rebuild_xlsx.py:8
Network WRITE WRITE ✓ Aligned SKILL.md 声明飞书 API 调用
Environment NONE READ ✗ Violation scripts/fix_xlsx_encoding.py:2 os.environ['USERPROFILE']
12 findings
🔗
Medium External URL 外部 URL
https://feishu.cn/doc/xxx
SKILL.md:32
🔗
Medium External URL 外部 URL
https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal
references/api_ref.md:6
🔗
Medium External URL 外部 URL
https://open.feishu.cn/open-apis/docx/v1/documents
references/api_ref.md:15
🔗
Medium External URL 外部 URL
https://open.feishu.cn/open-apis/docx/v1/documents/
references/api_ref.md:23
🔗
Medium External URL 外部 URL
https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=
references/api_ref.md:53
🔗
Medium External URL 外部 URL
https://open.feishu.cn/open-apis/contact/v3/users/search?query=
references/api_ref.md:66
🔗
Medium External URL 外部 URL
https://open.feishu.cn/open-apis/im/v1/chats?search_key=
references/api_ref.md:71
🔗
Medium External URL 外部 URL
https://feishu.cn/docx/
scripts/feishu_doc.py:52
🔗
Medium External URL 外部 URL
https://open.feishu.cn/open-apis/im/v1/files?receive_id_type=chat_id
scripts/feishu_msg.py:120
🔗
Medium External URL 外部 URL
https://open.feishu.cn/open-apis/im/v1/messages?container_id_type=chat&container_id=
scripts/feishu_msg.py:243
🔗
Medium External URL 外部 URL
https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=chat_id
scripts/send_news.py:25
🔗
Medium External URL 外部 URL
https://open.feishu.cn/open-apis/im/v1/files?file_name=
scripts/upload_test.py:17

File Tree

14 files · 48.3 KB · 1305 lines
Python 11f · 1041L Markdown 2f · 260L JSON 1f · 4L
├─ 📁 references
│ └─ 📝 api_ref.md Markdown 109L · 2.7 KB
├─ 📁 scripts
│ ├─ 🔑 config.json JSON 4L · 39 B
│ ├─ 🐍 feishu_doc.py Python 214L · 7.9 KB
│ ├─ 🐍 feishu_msg.py Python 332L · 12.7 KB
│ ├─ 🐍 fetch_chat_messages.py Python 103L · 4.6 KB
│ ├─ 🐍 fix_xlsx_encoding.py Python 59L · 2.3 KB
│ ├─ 🐍 rebuild_xlsx.py Python 94L · 2.9 KB
│ ├─ 🐍 send_news.py Python 36L · 1.8 KB
│ ├─ 🐍 test_blocks.py Python 27L · 1.2 KB
│ ├─ 🐍 test_blocks2.py Python 25L · 1.4 KB
│ ├─ 🐍 upload_sdk.py Python 38L · 1.2 KB
│ ├─ 🐍 upload_test.py Python 40L · 2.0 KB
│ └─ 🐍 write_news.py Python 73L · 3.6 KB
└─ 📝 SKILL.md Markdown 151L · 3.7 KB

Dependencies 2 items

PackageVersionSourceKnown VulnsNotes
lark-oapi * pip No 无版本锁定,建议锁定版本范围
openpyxl * pip No 无版本锁定,建议锁定版本范围

Security Positives

✓ 代码结构清晰,功能模块化良好
✓ 使用标准库 urllib 而非 subprocess 执行命令
✓ 所有网络请求都指向官方飞书 API 域名 open.feishu.cn
✓ 凭证存储在本地配置文件,未硬编码在代码中(主代码路径正确,但遗留脚本有问题)