Skip to content

🧪Test: aidp interface test and bugfix#3290

Merged
WMC001 merged 3 commits into
developfrom
djb_aidp_test
Jun 24, 2026
Merged

🧪Test: aidp interface test and bugfix#3290
WMC001 merged 3 commits into
developfrom
djb_aidp_test

Conversation

@DongJiBao2001

Copy link
Copy Markdown
Contributor

frontend page adjustments and API testing for the aidpsearch tool

@WMC001 WMC001 merged commit d103d17 into develop Jun 24, 2026
14 of 15 checks passed
base_url=normalized_url,
timeout=20.0,
verify_ssl=True,
timeout=60.0,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

安全风险:verify_sslTrue 改为 False,禁用了 SSL 证书验证。生产环境下 AIDP API 通信将容易遭受中间人攻击。建议保持 True 或从配置读取。

import re
match = re.search(r"/Tenants/([^/]+)/", url)
return match.group(1) if match else None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

fetch_all_aidp_knowledge_bases_implmax_pages = 1000page_size = 100,极端情况下会发起 1000 次请求、拉取 10 万条数据。如果 AIDP API 的 next_link 出现循环引用(bug 或恶意响应),将导致无限循环。建议添加 seen_urls 集合检测循环,或降低 max_pages 上限。

@YehongPan

Copy link
Copy Markdown
Contributor

🔍 Code Review Comments

1. [安全/漏洞] SSL 验证被禁用
fetch_all_aidp_knowledge_bases_implverify_ssl=False 禁用了 SSL 验证,存在中间人攻击风险。生产环境应默认启用 SSL 验证或提供可配置选项。

2. [逻辑漏洞] 无超时保护的全量拉取
fetch_all_aidp_knowledge_bases_implmax_pages = 1000page_size = 100,极端情况下会发起 1000 次请求拉取 100,000 条数据,无超时保护可能导致请求挂起数小时。建议添加总超时或合理的 max_pages 上限。

@YehongPan YehongPan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

  • [安全/漏洞] fetch_all_aidp_knowledge_bases_implverify_ssl=False 禁用了 SSL 验证,存在中间人攻击风险。生产环境应默认启用 SSL 验证或提供可配置选项。
  • [逻辑漏洞] fetch_all_aidp_knowledge_bases_implmax_pages = 1000page_size = 100,极端情况下会发起 1000 次请求拉取 100,000 条数据,无超时保护可能导致请求挂起数小时。建议添加总超时或合理的 max_pages 上限。

Comment thread backend/apps/aidp_app.py
return JSONResponse(status_code=HTTPStatus.OK, content=result)
except AppException:
raise
except Exception as e:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[代码规范] except Exception: 过于宽泛,建议捕获更具体的异常类型,避免掩盖潜在错误。

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.

4 participants