fix(security): enforce KB access on wiki reads and related IDOR paths

Gate wiki GET routes and initialization config reads with KBAccessRead,
and bind async task progress endpoints to the caller tenant via task ID
parsing. Closes cross-tenant read paths reported in GHSA-ph8f-4qwx-89rr
and related initialization/progress leaks.
This commit is contained in:
wizardchen
2026-07-02 11:59:50 +08:00
committed by lyingbug
parent ab790bcbd9
commit a17a2250ed
9 changed files with 297 additions and 35 deletions
+4
View File
@@ -1107,6 +1107,10 @@ func (h *KnowledgeBaseHandler) GetKBCloneProgress(c *gin.Context) {
c.Error(apperrors.NewBadRequestError("Task ID cannot be empty"))
return
}
if err := requireTaskProgressTenant(ctx, taskID); err != nil {
c.Error(err)
return
}
progress, err := h.knowledgeService.GetKBCloneProgress(ctx, taskID)
if err != nil {