feat(OpenCode TLS): 預設跳過 TLS 驗證 #24
Reference in New Issue
Block a user
Delete Branch "ai-review-resolve/20260620134144"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🤖 AI Code Review 團隊
🔍 新發現問題(2 筆)
shouldSkipOpenCodeTLSVerify函式的新增測試案例未能涵蓋所有可能的輸入情境。在process.env.OPENCODE_SKIP_TLS_VERIFY !== 'false'的新邏輯下,應增加測試案例來驗證當環境變數設定為空字串''、字串'0'或其他任意非'false'字串時,函式是否如預期般返回true(跳過 TLS 驗證)。這有助於確保此關鍵安全邏輯的行為符合預期,並揭示潛在的誤配置風險。preflight.test.js中,關於httpsAgent的測試案例也已涵蓋了預設行為(跳過 TLS)和明確設定為false(不跳過 TLS)的情況。請新增一個測試,驗證當環境變數process.env.OPENCODE_SKIP_TLS_VERIFY明確設定為'true'時,verifyLLM函式是否會傳遞一個不安全的httpsAgent給 OpenCode 服務進行預檢。