chore(ai-review): 清空已解決 findings 並補登誤報
CI / Unit Test (pull_request) Failing after 14m6s
CI / AI Code Review (pull_request) Failing after 30m59s

This commit is contained in:
Jeffery
2026-06-26 15:27:30 +08:00
parent 6c0ed33ac5
commit 1cd47171b4
2 changed files with 13 additions and 46 deletions
+12
View File
@@ -112,5 +112,17 @@
"role": "Leo",
"original_finding": "Sensitive Token 處理耦合在 Git 類別中,且未驗證有效性;建議將遮蔽邏輯交由 util.js 或於初始化時驗證。",
"reason": "token 遮蔽邏輯已實作於 util.js 的 maskSecrets 並由 Git 類別重用(非重複實作);token 存在性已於 inputs.js 的 required('GITEA_TOKEN') 驗證。Git 持有 token 以組 http.extraheader 為必要,耦合度可接受。"
},
{
"location": "app/lib/git.js:17, 37",
"role": "Mage/Assassin",
"original_finding": "Git 命令列以 -c http.extraheader 傳遞敏感 Token(竊取風險),並使用全域 git config(污染環境/權限衝突)。",
"reason": "token 經 `-c http.extraheader` 帶入雖會出現在 git 的 argv,但本 action 於單租戶、即拋的 CI 容器內執行,無其他使用者可讀 /proc,與已收錄的 gitea.js:28 同一信任模型。safe.directory 基於安全考量 git 刻意忽略 repo-local 設定,必須寫在 global(見已收錄的 git.js:39,52 排除),容器即拋無污染。detectConflict 的測試已於 app/lib/git.test.js 補上(整合測試)。"
},
{
"location": "app/lib/git.js:148, 84",
"role": "Leo/Rogue",
"original_finding": "Git 提交策略不精確(git add -A 可能帶入非預期變更),且頻繁執行完整 checkout/merge 造成高 I/O;建議改用 merge-tree。",
"reason": "createResolveBranch 的 `git add -A` 為刻意保留完整合併結果(含衝突標記)供人工於 PR 解決,已有整合測試(app/lib/git.test.js)驗證行為;於即拋容器、單次執行下,checkout/merge 的 I/O 成本可忽略,改用 merge-tree 屬選用最佳化而非缺陷,現行 detectConflict 行為正確且已測。"
}
]