chore(ai-review 狀態): 更新 findings 與 exclusions
AI / Code Review (pull_request) Failing after 22s

This commit is contained in:
2026-06-24 15:57:41 +00:00
parent a2d9777648
commit d65a4f95a9
2 changed files with 21 additions and 122 deletions
+20
View File
@@ -0,0 +1,20 @@
[
{
"location": "action.yml:94",
"role": "Assassin",
"original_finding": "儘量避免將敏感 Token 直接透過環境變數傳遞至 Shell 命令。若必須傳遞,請確保該 Runner 的環境配置已設定遮蔽機制,或使用 GitHub Actions 內建的 `secrets` 處理方式(如 `github.token` 或預先設定好的 Secret Context)來存取,而非直接由外部輸入。",
"reason": "Composite action 無法直接讀取呼叫端 secrets context,必須由 workflow 以 input/env 傳入;此處 token 只在 runner 內以 secret 值傳給 curl,且未輸出到 log,屬 CI secret 傳遞慣用模式。"
},
{
"location": "action.yml:78",
"role": "Mage",
"original_finding": "建議在 `printf` 使用變數時,確保輸入內容已適當轉義,或者考慮使用將變數內容寫入檔案並透過 `cat` 讀取的方式,避免直接在 `printf` 字串中展開變數。",
"reason": "此處使用 printf 的固定格式字串與 %s 參數,且變數皆以雙引號包住;issue/comment 內容中的雙引號不會重新進入 shell 語法解析,因此不會造成 shell 注入或解析錯誤。"
},
{
"location": "action.yml:85",
"role": "Leo",
"original_finding": "建議將與 Gitea API 互動的邏輯封裝成一個獨立的 shell script 或另一個獨立的 Action,使此 composite action 的 `runs` 階段更清晰,專注於流程編排而非細節實作。",
"reason": "此 action 的核心職責就是產生 AI 回覆並留言到 Gitea issue;目前 inline API 呼叫很短且已包含 URL 驗證、空回覆檢查與 JSON escaping,額外拆成 script/action 對此小型 composite action 並非必要修復。"
}
]