Scan Report
5 /100
General Text Recognition OCR - 通用文字识别
图片通用文字 OCR,支持中英文及多语种
纯OCR技能,代码与文档完全一致,路径隔离保护到位,无越权行为。
Safe to install
可直接使用。建议修复 SKILL.md 中的 API_KEY 占位符示例写法,防止用户误以为需要硬编码密钥。
Findings 1 items
| Severity | Finding | Location |
|---|---|---|
| Low | 文档示例含占位符 API_KEY | SKILL.md:26 |
| Resource | Declared | Inferred | Status | Evidence |
|---|---|---|---|---|
| Filesystem | READ | READ | ✓ Aligned | SKILL.md 声明读取本地图片路径;代码 _build_pic_base64() 仅读取 path/image/file 字段,normpath + .. … |
| Network | WRITE | WRITE | ✓ Aligned | SKILL.md 声明调用极速数据 API;代码 POST 到 https://api.jisuapi.com/generalrecognition/recog… |
| Environment | READ | READ | ✓ Aligned | SKILL.md 声明需要 JISU_API_KEY 环境变量;代码仅读取 JISU_API_KEY,不遍历其他环境变量 |
| Shell | NONE | NONE | — | 代码未使用 subprocess/os.system/shelve 等 shell 执行路径 |
1 High 4 findings
High API Key 疑似硬编码凭证
API_KEY="your_appkey_here" SKILL.md:26 Medium External URL 外部 URL
https://www.jisuapi.com/ SKILL.md:9 Medium External URL 外部 URL
https://www.jisuapi.com/api/generalrecognition/ SKILL.md:21 Medium External URL 外部 URL
https://api.jisuapi.com/generalrecognition/recognize generalrecognition.py:17 File Tree
2 files · 10.4 KB · 314 lines Python 1f · 164L
Markdown 1f · 150L
├─
generalrecognition.py
Python
└─
SKILL.md
Markdown
Dependencies 1 items
| Package | Version | Source | Known Vulns | Notes |
|---|---|---|---|---|
requests | 未声明(依赖文件缺失) | pip | No | 代码导入了 requests 但无 requirements.txt;requests 本身可信但建议锁定版本 |
Security Positives
✓ 路径隔离设计:使用 normpath + .. 过滤 + cwd join,限制只能读取 cwd 下的文件,防止目录穿越攻击
✓ 无 subprocess/shelve 等 shell 执行路径,代码仅做图片读取和 HTTP 请求
✓ 代码结构简单清晰,职责单一,无阴影功能(shadow behavior)
✓ API 凭证仅从环境变量读取,不硬编码、不外传
✓ 仅访问声明的 jisuapi.com 域名,无其他网络请求
✓ 无遍历环境变量行为
✓ JSON 输出有安全封装,错误信息不泄露敏感路径