feat(tencent-ssl): add Tencent SSL Certificate service package#280
feat(tencent-ssl): add Tencent SSL Certificate service package#280dingzhejianjian wants to merge 4 commits into
Conversation
|
Review 阻塞:服务包目录放错位置了。当前 diff 把 |
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 本次 PR 仅包含两处配置修改,目的是注册新的 tencent-ssl 服务包:
经核查,命名规范( |
|
已修正:
|
|
整体上的文件布局还是不太对,参考一下其他已经 merge 的 pr ? |
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 本次 PR 主要完成了两项工作:1) 将 Tencent SSL 服务从根目录迁移到 经审查, 未发现引入的正确性缺陷、安全漏洞或行为回归。 |
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 该 PR 修改了 变更内容:
评估:
|
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 本次PR修改了
整体来看,这是一项正确的缺陷修复:之前 |
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 本次 PR 对
整体改动较小,属于防御性修复。 |
dingzhejianjian
left a comment
There was a problem hiding this comment.
✅ 已完成手动验证。服务注册正常,ListCertificates 返回证书数据,GetCertificate 缺参正确拦截。
|
Reviewer note: this PR currently has merge conflicts with the target branch, so it cannot be merged or reviewed safely in its current state. Please rebase or merge the latest base branch, resolve the conflicts, and make sure GitHub Actions pass again. I am marking/keeping this PR as draft until the conflicts are resolved. |
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 本次 PR 仅修改
经检查,未发现重复的 service key、语法错误或路径格式异常。所有变更均为静态配置新增/调整,无控制流、无输入处理逻辑,无明显的正确性、安全性或回归风险。 |
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 本次 PR 仅修改
从 diff 内容看,bin key 与 bin path、files 中的 js 文件与目录名均一一对应,未发现条目缺失或不一致。新增依赖与新增服务之间的对应关系合理。未在 diff 范围内发现明显的行为回归、安全漏洞或数据完整性风险。 |
手动验证结果 ✅
结论:3/3 通过,可进入 review。 |
手动验证结果(完整)① tools/list命令: 返回: {
"id": 1,
"jsonrpc": "2.0",
"result": {
"tools": [
{
"description": "Tencent_SSL.Tencent_SSL/GetCertificate",
"inputSchema": {
"properties": {
"certificate_id": {
"type": "string"
}
},
"required": [],
"type": "object"
},
"name": "tencent-ssl__ssl-live__get_certificate"
},
{
"description": "Tencent_SSL.Tencent_SSL/ListCertificates",
"inputSchema": {
"properties": {
"limit": {
"description": "Wrapper message for `int64`.",
"type": ["string", "null"]
},
"offset": {
"description": "Wrapper message for `int64`.",
"type": ["string", "null"]
}
},
"required": [],
"type": "object"
},
"name": "tencent-ssl__ssl-live__list_certificates"
}
]
}
}② ListCertificates命令: 返回: {
"message": "8c8c97ef-a06f-4adb-8f78-c6a3f789e353",
"data": [
{
"id": "YiQGLAOv",
"domain": "be1com.top",
"certType": "SVR",
"status": "证书审核失败",
"createTime": "2026-06-25 22:21:22"
}
],
"total": 1
}③ GetCertificate(空参数测试)命令: 返回: {
"code": "invalid_argument",
"message": "INVALID_ARGUMENT: certificate_id is required"
}✅ 结论:3/3 全部通过,可进入 review。 |
74e0b3a to
0626c59
Compare
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 本次 PR 规模巨大(548 文件,+50k/-3k 行),核心变更是新增多个第三方服务集成包(Tencent SSL、Qingteng HIDS v5、Huorong Endpoint Security、DBAudit 等)并升级 SDK HTTP 工具链(引入 fetchWithTimeout、createTlsDispatcher、redactSensitive 等)。 审阅重点放在新增服务的网络层实现与 SDK 变更上。整体而言 SDK 侧改进较为扎实(标准 fetch 的 timeout/dispatcher 抽象、敏感信息脱敏),但多个新服务包在对接外部 HTTP API 时存在共性缺陷:对标准 fetch 的选项语义理解有误,导致超时与 TLS 跳过选项被静默忽略;个别服务还存在全局环境变量操作等并发安全隐患。 发现 3 个高置信度问题:1) DBAudit OpenAPI 客户端在 GET 请求中将 accessKeyId、accessSign 等敏感凭证拼入 URL 查询串,存在凭证泄漏风险;2) Tencent SSL 向标准 fetch 传入自定义 timeoutMs 与 TLS 布尔选项,二者均被忽略;3) Qingteng HIDS v5 同样传入无效 timeoutMs,且通过修改全局 process.env.NODE_TLS_REJECT_UNAUTHORIZED 跳过 TLS 验证,并发极不安全。建议优先修复上述安全与可靠性缺陷。 |
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 本次 PR 仅修改了 |
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 该 PR 仅修改了
整体评估:每个新增的 |
591e0db to
a305d47
Compare
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 本次变更新增了 Tencent SSL Certificate 服务包,包含完整的 gRPC 服务定义、TC3-HMAC-SHA256 签名实现、API 调用封装及测试。同时修改了 octobus-tentacles 注册表和根 package.json。 整体评估:
其余部分(签名计算、日志、上下文合并、错误处理等)无明显缺陷。 |
| const reason = err?.cause?.message || err?.message || 'fetch failed'; | ||
| throw errorWithCode('UNAVAILABLE', reason); | ||
| } | ||
| const text = await res.text(); |
There was a problem hiding this comment.
fetchJson 向标准 fetch 传入了无效的 timeoutMs 与 TLS 选项
fetchJson 将 timeoutMs 和 buildTlsOptions 返回的自定义字段(insecureSkipVerify、skipTlsVerify 等)直接展开传给标准 fetch(url, { ...init, timeoutMs, ...buildTlsOptions(bindings) })。Node.js 内置的 fetch(基于 undici)不认识这些字段,因此:1) 配置中的 timeoutMs(默认 10000 ms)完全不会生效,请求在网络异常或上游无响应时可能永久挂起;2) 即使 bindings 中启用了 TLS 跳过验证,相关字段也会被静默忽略,导致连接自签名/内部证书时失败。
Problem code:
Changed code at services/tencent__ssl/src/tencent-ssl.js:141
Recommendation:
应使用 AbortSignal.timeout(timeoutMs) 作为 fetch 的 signal 参数来实现超时;对于 TLS 跳过验证,应使用 undici 的 Agent 并设置 connect: { rejectUnauthorized: false },或通过环境变量控制,而不是传入不认识的布尔字段。
|
PR Title: feat(tencent-ssl): add Tencent SSL Certificate ser... Commit: 本 PR 修复了 |




接入设备
腾讯云 SSL 证书服务(SSL Certificate),提供 SSL 证书的申请、查询、管理能力,支持免费证书和付费证书。
设备版本
SSL Certificate,API 版本 2019-12-05,端点
ssl.tencentcloudapi.com认证方式
腾讯云 API 密钥(SecretId + SecretKey),TC3-HMAC-SHA256 签名
实现方法
ListCertificatesDescribeCertificatesGetCertificateDescribeCertificateDetailReview 修复
services/下(遵循 OctoBus 标准布局)secret.schema.json增加secretId别名声明联调证据
证据一:MCP 工具列表(证明服务已注册到 OctoBus)
Response:
{ "id": 1, "jsonrpc": "2.0", "result": { "tools": [ {"name": "tencent-ssl__ssl-live__list_certificates", "description": "Tencent_SSL.Tencent_SSL/ListCertificates"}, {"name": "tencent-ssl__ssl-live__get_certificate", "description": "Tencent_SSL.Tencent_SSL/GetCertificate"} ] } }证据二:Connect RPC — ListCertificates(返回真实证书数据)
Response:
{ "message":"1eb240dc-56fb-4943-b521-71e13f96c966", "data":[{"id":"******","domain":"be1com.top","certType":"SVR","status":"证书审核中","createTime":"2026-06-25 22:21:22"}], "total":1 }证据三:GetCertificate(缺参 => 参数校验拦截)
Response (HTTP 400):
{"code":"invalid_argument","message":"INVALID_ARGUMENT: certificate_id is required"}测试结果
目录结构