Files
starRiverProperty/docs/reviews/alibaba-audit-2026-04-24/04-maven-cloudwalk-intelligent-davinci-manager.md
2026-04-24 23:49:37 +08:00

21 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 04 `maven-cloudwalk-intelligent-davinci-manager` — 阿里巴巴规范走查(整理版)
**范围**:共 **13**`*.java``davinci-manager-common` + `davinci-manager-storage`)。
## 问题清单(节选)
| 严重度 | 位置 | 类别 | 说明 | 建议 |
|--------|------|------|------|------|
| P0 | `FileStorageManagerImpl.java` | 安全 | `fileDownLoadWithAbsoluteUrl` 将用户传入 URL 作为 Feign `target`**SSRF** 风险 | URL 白名单、协议限制、禁止内网/metadata |
| P0 | `FileStorageManagerImpl.java` | 资源 | `feign.Response` 未在 `finally`/`try-with-resources`**close**,易连接泄漏 | 确保关闭 Response |
| P1 | `FileStorageManagerImpl.java` | 健壮性 | `DavinciResult` 未系统判空 | 统一空安全/错误模型 |
| P1 | `FileStorageManagerImpl.java` | 异常 | `catch (Exception)` 过宽;错误码空串、未链 cause | 收窄、记录日志、`initCause` |
| P1 | `FileManagerFeignClientFallback.java` | 容错 | Fallback 一律 `RuntimeException`,无结构化降级 | 返回失败 `DavinciResult` 或统一异常类型 + 日志 |
| P1 | `OuterCallFeignClient.java` | Feign | `@RequestLine("GET ")` 路径为空,易误用 | 明确相对路径或文档约束 |
| P2 | `DavinciServiceException.java` | API | 继承受检 `Exception` | 评估改为运行时异常 + 错误码 |
| P2 | 接口参数名 | 命名 | `paramString` 等反编译式命名 | 语义化重命名(与调用方协同) |
## 小结
**P0****SSRF + Feign Response 资源管理** 为首要整改;其次统一 **异常与降级** 语义。