Files
codex/.gitea/ai-review/exclusions.json
T
AI Review Bot fc6e4bafd4
AI / Code Review (pull_request) Failing after 1s
CI / 計算版本號 (pull_request) Successful in 2s
CI / 品質檢查 (pull_request) Successful in 1m43s
chore: update ai-review findings [ai-review-bot][failure]
2026-06-24 10:45:34 +00:00

69 lines
4.0 KiB
JSON
Raw 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.
[
{
"location": "action.yaml:23",
"role": "Assassin",
"original_finding": "將包含認證資訊的 `OAUTH` 透過環境變數傳遞,這使得該敏感資訊在容器內的任何進程皆可透過環境變數(如 `/proc/self/environ`)輕易竊取。",
"reason": "此 action 透過 Gitea/GitHub Docker Action input 接收 secretaction metadata 只能將 input 映射為容器環境變數;呼叫端仍使用 secrets.CODEX_OAUTH,未在 workflow 明文暴露。"
},
{
"location": "entrypoint.sh:18",
"role": "Assassin",
"original_finding": "雖然有 `chmod 600`,但 `auth.json` 放在 `/root/.codex/` 目錄下,若發生容器逃逸,該敏感金鑰極易被讀取。",
"reason": "Codex CLI 目前需要讀取 CODEX_HOME/auth.json;容器內已限制為 600 權限,外部 Secret Store 掛載不是此 Docker Action 目前可控制的介面。"
},
{
"location": "action.yaml:6",
"role": "Leo",
"original_finding": "將 Base64 編碼的認證資訊設為 Action input,導致明文暴露在 Workflow 配置中,難以維護。",
"reason": "workflow 傳入的是 secrets.CODEX_OAUTH,不是明文值;使用 input 是 Docker Action 接收呼叫端 secret 的標準介面。"
},
{
"location": "entrypoint.sh:22",
"role": "Rogue",
"original_finding": "在腳本中頻繁進行 I/O 操作(重複寫入 auth.json),缺乏快取檢查。",
"reason": "每次 Docker Action 執行都是短生命週期容器,auth.json 需要從當次 secret 重建;快取檢查不會降低跨執行 I/O,也可能增加 secret 狀態判斷複雜度。"
},
{
"location": "action.yaml:4",
"role": "Bard",
"original_finding": "輸入參數 `oauth` 實質為 base64 編碼的 json,命名易生誤解。",
"reason": "此 action 已對外發布並由既有 workflow 使用 oauth input;直接更名會造成破壞性變更,先保留相容介面與描述文字。"
},
{
"location": "Dockerfile:4",
"role": "Rogue",
"original_finding": "在 Dockerfile 中安裝了 git 且未清理,導致映像檔過大。",
"reason": "Codex CLI 與 plugin 安裝/執行流程可能需要 git 支援;為避免 runtime 缺少 git 造成 action 失敗,目前保留 git。"
},
{
"location": "Dockerfile:25",
"role": "Rogue",
"original_finding": "插件安裝指令採取連續序列執行,導致多次獨立的網路 I/O 等待,嚴重浪費建置時間。",
"reason": "codex plugin 指令會修改同一份本機 plugin 狀態,並行安裝可能造成狀態競爭;目前保留循序安裝以確保可預測性。"
},
{
"location": "entrypoint.sh:22",
"role": "Leo",
"original_finding": "直接使用 `mktemp` 在 `CODEX_HOME` 目錄下建立臨時檔案,且 `CODEX_HOME` 若未正確隔離,在多個 Action 同時執行時可能會導致檔案名稱衝突。",
"reason": "Docker Action 每次執行都有獨立容器與 CODEX_HOME;mktemp 也會建立隨機檔名,實務上不會跨 action 執行衝突。"
},
{
"location": "entrypoint.sh:16",
"role": "Leo",
"original_finding": "硬編碼了預設路徑 `/root/.codex`,這使得映像檔的可移植性受限,且如果在非 root 使用者環境下執行此容器,可能會因為權限問題而失敗。",
"reason": "Dockerfile 明確以 root 環境執行並設定 CODEX_HOME=/root/.codexentrypoint 仍允許呼叫端用 CODEX_HOME 覆寫預設路徑。"
},
{
"location": "entrypoint.sh:6",
"role": "Maya",
"original_finding": "應在測試案例中模擬空 OAUTH 輸入,並驗證腳本是否正確拋出錯誤並以 exit 1 終止。",
"reason": "AI 對話收斂判定為誤報(問題在最新程式碼中不成立或不適用)"
},
{
"location": "entrypoint.sh:11",
"role": "Maya",
"original_finding": "應在測試案例中模擬空 MODEL 輸入,並驗證腳本是否正確拋出錯誤並以 exit 1 終止。",
"reason": "AI 對話收斂判定為誤報(問題在最新程式碼中不成立或不適用)"
}
]