Scan Report
20 /100
tjweather
通过 TJWeather API 查询全球任意地点的天气预报,支持自动判断时区并按当地时间进行统计
天气查询工具,存在一处文档未声明的 .env 读取逻辑(阴影功能),但为合法的 API Key 获取方式,无恶意行为。
Safe to install
建议补充 SKILL.md 中关于 .env 文件回退读取的说明,使文档与代码行为一致。无需阻止使用。
Findings 2 items
| Severity | Finding | Location |
|---|---|---|
| Medium | 阴影功能:.env 文件回退读取 | scripts/tjweather.py:24-34 |
| Low | 时区处理说明不准确 | scripts/geocoder.py:228-234 |
| Resource | Declared | Inferred | Status | Evidence |
|---|---|---|---|---|
| Network | READ | READ | ✓ Aligned | SKILL.md:geocoder.py/tjweather.py 调用第三方天气和地理编码 API |
| Environment | NONE | READ | ✗ Violation | scripts/tjweather.py:21 访问 os.environ.get('TJWEATHER_API_KEY') 但 SKILL.md 仅在 met… |
| Filesystem | NONE | READ | ✗ Violation | scripts/tjweather.py:24-34 读取 ../.env 文件(阴影功能) |
7 findings
Medium External URL 外部 URL
https://www.tjweather.com/ README.md:6 Medium External URL 外部 URL
https://www.tjweather.com/Apply README.md:7 Medium External URL 外部 URL
https://www.tjweather.com/vis/ README.md:25 Medium External URL 外部 URL
https://api.tjweather.com SKILL.md:4 Medium External URL 外部 URL
https://nominatim.openstreetmap.org/search?q= scripts/geocoder.py:158 Medium External URL 外部 URL
https://photon.komoot.io/api/?q= scripts/geocoder.py:174 Medium External URL 外部 URL
https://api.tjweather.com/beta?loc= scripts/tjweather.py:38 File Tree
4 files · 36.4 KB · 621 lines Python 2f · 459L
Markdown 2f · 162L
├─
▾
scripts
│ ├─
geocoder.py
Python
│ └─
tjweather.py
Python
├─
README.md
Markdown
└─
SKILL.md
Markdown
Security Positives
✓ 仅使用 Python 标准库(urllib、json、os),无第三方依赖
✓ 无远程代码执行、shell 注入风险
✓ 网络请求使用标准 urllib,带有超时保护
✓ API 请求携带 User-Agent 标识(tjweather_clawhub/1.0)
✓ 地理编码实现三级 fallback 机制(Nominatim → Photon → 内置库),行为可靠