Skip to content

Fix/webhook ssrf - #918

Merged
r350178982 merged 2 commits into
masterfrom
fix/webhook-ssrf
Oct 19, 2026
Merged

r350178982 merged 2 commits into
masterfrom
fix/webhook-ssrf

Conversation

@zwfxxxxx

Copy link
Copy Markdown
Contributor

No description provided.

@seafile-dev seafile-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

结论:实现符合分析文档,存在一项测试接入警告,详见行内评论。

阻塞问题:未发现已复现的 SSRF 绕过或其他阻塞实现缺陷。

警告:新增 SSRF 回归测试尚未接入当前 GitHub Actions 测试入口;建议将该测试模块加入 CI,使后续安全回归能够阻止合并。

验证:Python 3.12.3、Requests 2.32.5、urllib3 2.6.3 下,新增的 16 项测试在隔离部署配置后全部通过,包括真实本地 HTTP/TLS、原域名 SNI/证书校验、禁止重定向、IP 固定、私网拒绝和 worker 失败处理。Redis/数据库交互使用测试内 mock,未执行完整部署集成测试。

设计约束已落实:发送前重新解析且拒绝任一非公网结果,连接已校验 IP,保留原域名 TLS 校验,禁止重定向;正常通知正文和签名保持兼容。应与 dtable-web #6359 配套发布。

from dtable_events.webhook.webhook import Webhooker


class WebhookDestinationTest(TestCase):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Warning] 新增安全测试未接入 CI

影响:当前 Actions 仅调用 dtable_events/tests/test.sh test,该入口直接执行 sql/sql_test.py,没有发现或导入本模块。因此这些私网拦截、DNS 重绑定和重定向回归测试即使失败,也不会使现有 CI 失败。

建议修复:在现有 CI 环境初始化后显式执行 python -m unittest dtable_events.webhook.tests,或将该模块纳入统一测试入口,并确认失败状态会传递给 Actions。

@r350178982
r350178982 merged commit 72c2256 into master Oct 19, 2026
1 check passed
@r350178982
r350178982 deleted the fix/webhook-ssrf branch October 19, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants