Scan Report
This report was generated in Chinese. Some content may be in Chinese.
15 /100
zhihu-fetcher
知乎热榜数据抓取工具,支持三级认证降级(Browser Profile → File Cookie → Fallback Source),数据存储至 SQLite 并可生成 HTML 可视化报告
知乎热榜数据采集工具,代码逻辑清晰透明,核心功能(抓取→存储→查询→可视化)均为声明范围内。唯一风险点是固化 cookie 凭证存储在配置文件中随代码分发,SKILL.md 有安全警告但未在 allowed-tools 中声明 shell/network 权限。
Safe to install
建议:1) 将 config/fallback-sources.json 从代码库分离,由 .gitignore 排除;2) SKILL.md 补充 allowed-tools 声明(shell:WRITE, network:READ, filesystem:WRITE);3) 将 fallback 源 URL 列表从配置中移至白名单。
Findings 3 items
| Severity | Finding | Location |
|---|---|---|
| Low | browser_profile 认证方式为存根实现 Doc Mismatch | snippets/fetch-hot.js:38 |
| Low | 第三方依赖无版本锁定 Supply Chain | snippets/fetch-hot.js:1 |
| Info | 凭证以配置文件形式存储 Sensitive Access | config/fallback-sources.json:6 |
| Resource | Declared | Inferred | Status | Evidence |
|---|---|---|---|---|
| Shell | NONE | WRITE | ✗ Violation | scripts/save_to_db.py:48 — subprocess.run(['node', ...]) |
| Network | NONE | READ | ✗ Violation | snippets/fetch-hot.js, snippets/cookie-manager.js — HTTPS请求到 zhihu.com |
| Filesystem | NONE | WRITE | ✗ Violation | scripts/init_db.py, scripts/db.py, scripts/generate_html.py — 创建目录、SQLite、HTML文件 |
| Environment | NONE | NONE | — | 未访问 os.environ |
| Browser | NONE | NONE | — | SKILL.md 声明 browser_profile 为认证方式,但 fetchWithBrowser() 只抛出错误提示,实际未使用浏览器 |
1 High 30 findings
High IP Address 硬编码 IP 地址
120.0.0.0 snippets/cookie-manager.js:64 Medium External URL 外部 URL
https://www.zhihu.com SKILL.md:41 Medium External URL 外部 URL
https://api.example.com/zhihu-hot.json SKILL.md:299 Medium External URL 外部 URL
https://www.zhihu.com/question/2016604377415120691 data/index.html:274 Medium External URL 外部 URL
https://www.zhihu.com/question/2016607467954467246 data/index.html:274 Medium External URL 外部 URL
https://www.zhihu.com/question/2016444661095424928 data/index.html:274 Medium External URL 外部 URL
https://www.zhihu.com/question/2016214590560625837 data/index.html:274 Medium External URL 外部 URL
https://www.zhihu.com/question/2016458550067613931 data/index.html:274 Medium External URL 外部 URL
https://www.zhihu.com/question/2016267906896322825 data/index.html:274 Medium External URL 外部 URL
https://www.zhihu.com/question/398694606 data/index.html:274 Medium External URL 外部 URL
https://www.zhihu.com/question/2015113794855142897 data/index.html:274 Medium External URL 外部 URL
https://www.zhihu.com/question/2015300831826690616 data/index.html:274 Medium External URL 外部 URL
https://www.zhihu.com/question/2015024147378500415 data/index.html:274 Medium External URL 外部 URL
https://www.zhihu.com/question/2015804010213373773 data/zhihu-hot-2026-03-15.json:10 Medium External URL 外部 URL
https://www.zhihu.com/question/2015910417793320691 data/zhihu-hot-2026-03-15.json:11 Medium External URL 外部 URL
https://www.zhihu.com/question/2016280494870853302 data/zhihu-hot-2026-03-15.json:12 Medium External URL 外部 URL
https://www.zhihu.com/question/455135036 data/zhihu-hot-2026-03-15.json:13 Medium External URL 外部 URL
https://www.zhihu.com/question/2016099547433161361 data/zhihu-hot-2026-03-15.json:14 Medium External URL 外部 URL
https://www.zhihu.com/question/2015551066716989113 data/zhihu-hot-2026-03-15.json:16 Medium External URL 外部 URL
https://www.zhihu.com/question/2016526047311577504 data/zhihu-hot-2026-03-15.json:18 Medium External URL 外部 URL
https://zhihu.com/question/1 scripts/db.py:177 Medium External URL 外部 URL
https://zhihu.com/question/2 scripts/db.py:178 Medium External URL 外部 URL
https://www.zhihu.com/hot snippets/browser-research.js:5 Medium External URL 外部 URL
https://www.zhihu.com/api/v3/feed/topstory/hot-list-web?limit=$ snippets/cookie-manager.js:115 Medium External URL 外部 URL
https://www.zhihu.com/question/$ snippets/cookie-manager.js:132 Medium External URL 外部 URL
https://www.zhihu.com/ snippets/research-anti-crawl.js:38 Medium External URL 外部 URL
https://www.zhihu.com/api/v3/feed/topstory/hot-list-web?limit=3 snippets/test-hot-structure.js:83 Medium External URL 外部 URL
https://api.zhihu.com/people/self snippets/test-zhihu-vapi-style.js:7 Medium External URL 外部 URL
https://www.zhihu.com/api/v3/feed/topstory/hot-list-web?limit=10 snippets/test-zhihu-vapi-style.js:160 Medium External URL 外部 URL
https://api.zhihu.com/topstory/hot-list?limit=10 snippets/test-zhihu-vapi-style.js:161 File Tree
25 files · 100.4 KB · 3260 lines JavaScript 15f · 1412L
Python 5f · 1037L
HTML 1f · 386L
Markdown 1f · 366L
JSON 3f · 59L
├─
▾
config
│ └─
fallback-sources.json
JSON
├─
▾
data
│ ├─
index.html
HTML
│ └─
zhihu-hot-2026-03-15.json
JSON
├─
▾
scripts
│ ├─
db.py
Python
│ ├─
generate_html.py
Python
│ ├─
init_db.py
Python
│ ├─
query.py
Python
│ └─
save_to_db.py
Python
├─
▾
snippets
│ ├─
browser-research.js
JavaScript
│ ├─
cookie-manager.js
JavaScript
│ ├─
fallback.js
JavaScript
│ ├─
fetch-hot.js
JavaScript
│ ├─
hot.js
JavaScript
│ ├─
rate-limiter.js
JavaScript
│ ├─
research-anti-crawl.js
JavaScript
│ ├─
search.js
JavaScript
│ ├─
setup-cookie.js
JavaScript
│ ├─
test-fallback.js
JavaScript
│ ├─
test-file-cookie.js
JavaScript
│ ├─
test-fixed-cookie.js
JavaScript
│ ├─
test-hot-structure.js
JavaScript
│ ├─
test-simple.js
JavaScript
│ └─
test-zhihu-vapi-style.js
JavaScript
├─
_meta.json
JSON
└─
SKILL.md
Markdown
Dependencies 3 items
| Package | Version | Source | Known Vulns | Notes |
|---|---|---|---|---|
sqlite3 | built-in | python stdlib | No | Python 标准库,无需安装 |
Node.js 标准库 | N/A | node built-in (fs, https, path, crypto) | No | 仅使用 Node.js 内置模块,无第三方依赖 |
requests | N/A | N/A | No | 未使用 requests 库,所有 HTTP 请求均为 Node.js 原生实现 |
Security Positives
✓ 代码结构清晰,所有脚本均为单一功能模块,无复杂混淆逻辑
✓ 数据库操作仅使用 sqlite3 标准库,无 ORM 依赖
✓ HTML 报告生成使用内嵌模板,无模板注入风险
✓ 热榜数据输出为纯 JSON,无序列化代码执行路径
✓ 配置中的 fallback 源 URL 仅指向 github.com 和 zhihu.com,无可疑外部域名
✓ 未发现 base64/eval/动态代码执行等高危混淆技术
✓ rate-limiter 模块提供了合理的请求频率控制
✓ SKILL.md 有中文/英文双语说明,文档质量较好
✓ z_c0 凭证字段为空,降低了凭证泄露的潜在影响