10 Commits
Author SHA1 Message Date
fit2cloud-chenywandClaude bbfc4cc8f5 fix(Security): Host header injection auth bypass and forged admin embedded token (CNVD)
- TokenMiddleware/ResponseMiddleware/audit logger use scope['path']
  instead of request.url.path for whitelist checks: a crafted Host
  header (e.g. x/api/v1/mcp) was concatenated into Starlette's URL
  and made protected routes match the /mcp* whitelist entry
- validateEmbedded rejects admin accounts and non-type-4 apps, so a
  self-signed token with account=admin can no longer impersonate the
  administrator
- Add HostValidationMiddleware rejecting malformed Host headers at the
  outermost layer (defense in depth)
- Add regression tests for host validation, whitelist matching and
  source-level guards

Co-Authored-By: Claude <[email protected]>
2026-08-31 11:05:05 +08:00
ulleo 74a0382c52 feat: add system log in mcp_start 2026-07-13 13:55:00 +08:00
wangjiahao 95b058a2ad refactor: add log 2025-12-30 17:39:55 +08:00
wangjiahao e5fd7d297a fix: package error 2025-12-30 15:09:51 +08:00
wangjiahao 5c476971e5 fix: package error 2025-12-30 14:45:57 +08:00
wangjiahao f609dc2856 refactor: update log management 2025-12-30 14:26:31 +08:00
wangjiahao 57b3e6284f refactor: update log 2025-12-30 11:33:12 +08:00
wangjiahao 7efa0a9cff refactor: update logger decorator 2025-12-29 10:58:50 +08:00
wangjiahao ad7caefcca refactor: update logger decorator 2025-12-28 21:41:49 +08:00
wangjiahao 1df98cec0f refactor: Add logs to the system operation method 2025-12-26 17:14:34 +08:00