From 35112e2132116c143db844a3c6c98d2ba4fa5903 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Wed, 13 May 2026 06:12:05 +0000 Subject: [PATCH 1/6] fix: rename NuGet step and expand exclusions --- .gitea/ai-review/exclusions.json | 22 +++++++++++++++++++++- action.yml | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.gitea/ai-review/exclusions.json b/.gitea/ai-review/exclusions.json index 06f9d41..229ece6 100644 --- a/.gitea/ai-review/exclusions.json +++ b/.gitea/ai-review/exclusions.json @@ -6,6 +6,11 @@ "title": "使用來自非官方來源的自訂 Action 的供應鏈風險", "reason": "列入排除問題" }, + { + "id": 2, + "title": "Composite Action 將 shell 移到 runs 層級", + "reason": "列入排除問題" + }, { "id": 3, "title": "cache-nuget@v0.0.3 釘選到修補版本", @@ -13,7 +18,22 @@ }, { "id": 4, - "title": "action 需要 skip_checkout / skip_cache 兩個 inputs", + "title": "快取 NuGet 套件動作更新至 v0.0.3 後需額外更新紀錄或測試清單", + "reason": "列入排除問題" + }, + { + "id": 5, + "title": "復原專案步驟依賴 cache-hit 輸出可能誤跳過 restore", + "reason": "列入排除問題" + }, + { + "id": 6, + "title": "cache key 與專案檔變更的關聯應由外部 cache-nuget 動作管理", + "reason": "列入排除問題" + }, + { + "id": 7, + "title": "action.yml 的流程需要自動化測試", "reason": "列入排除問題" } ] diff --git a/action.yml b/action.yml index e23e5a8..e3f193e 100644 --- a/action.yml +++ b/action.yml @@ -6,7 +6,7 @@ runs: steps: - name: 取得專案 uses: actions/checkout@v6 - - name: 快取 NUGET 套件 + - name: 快取 NuGet 套件 id: cache-nuget uses: https://gitea.jsc.idv.tw/actions/cache-nuget@v0.0.3 - name: 復原專案 From 65b26ee9bb2c9f8091ce85fe1b5ee5b67c7080b9 Mon Sep 17 00:00:00 2001 From: AI Review Bot Date: Wed, 13 May 2026 06:13:30 +0000 Subject: [PATCH 2/6] chore: update ai-review findings [skip ci] --- .gitea/ai-review/findings.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .gitea/ai-review/findings.json diff --git a/.gitea/ai-review/findings.json b/.gitea/ai-review/findings.json new file mode 100644 index 0000000..e278315 --- /dev/null +++ b/.gitea/ai-review/findings.json @@ -0,0 +1,23 @@ +[ + { + "level": "warning", + "role": "Rex", + "location": "action.yml:12", + "suggestion": "建議審查 `https://gitea.jsc.idv.tw/actions/cache-nuget@v0.0.3` 這個外部動作的來源和內容。使用來自非官方或自架伺服器的動作存在供應鏈風險,若該伺服器或動作被惡意篡改,可能導致 CI/CD 流程被入侵。建議評估其可信度,或考慮使用官方、廣泛審查過的替代方案,或將其程式碼鏡像到受控的環境中。", + "is_new": true + }, + { + "level": "warning", + "role": "Aria", + "location": "action.yml:9", + "suggestion": "請將 'NUGET' 更正為正確的專有名詞寫法 'NuGet',以保持命名一致性與正確性。", + "is_new": true + }, + { + "level": "info", + "role": "Zara", + "location": "b/action.yml:10", + "suggestion": "建議定期審查並更新 `https://gitea.jsc.idv.tw/actions/cache-nuget` 的版本(目前為 `v0.0.3`)。新版本可能包含效能優化、錯誤修復或新功能,有助於進一步縮短 CI/CD 流程的執行時間,確保持續採用最新的快取策略與技術。", + "is_new": true + } +] From 59b00b525d4822dc22451e66a4eaa59729bf6a9c Mon Sep 17 00:00:00 2001 From: Jeffery Date: Wed, 13 May 2026 06:18:44 +0000 Subject: [PATCH 3/6] chore: add cache-nuget review exclusions --- .gitea/ai-review/exclusions.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitea/ai-review/exclusions.json b/.gitea/ai-review/exclusions.json index 229ece6..26de13d 100644 --- a/.gitea/ai-review/exclusions.json +++ b/.gitea/ai-review/exclusions.json @@ -35,6 +35,16 @@ "id": 7, "title": "action.yml 的流程需要自動化測試", "reason": "列入排除問題" + }, + { + "id": 8, + "title": "審查 https://gitea.jsc.idv.tw/actions/cache-nuget@v0.0.3 的來源和內容", + "reason": "列入排除問題" + }, + { + "id": 9, + "title": "定期審查並更新 cache-nuget 版本", + "reason": "列入排除問題" } ] } From 72d16091c0c9c5a5e758114197bc4490a72e8ae9 Mon Sep 17 00:00:00 2001 From: AI Review Bot Date: Wed, 13 May 2026 06:19:26 +0000 Subject: [PATCH 4/6] chore: update ai-review findings [skip ci] --- .gitea/ai-review/findings.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/ai-review/findings.json b/.gitea/ai-review/findings.json index e278315..7a81d27 100644 --- a/.gitea/ai-review/findings.json +++ b/.gitea/ai-review/findings.json @@ -2,15 +2,15 @@ { "level": "warning", "role": "Rex", - "location": "action.yml:12", - "suggestion": "建議審查 `https://gitea.jsc.idv.tw/actions/cache-nuget@v0.0.3` 這個外部動作的來源和內容。使用來自非官方或自架伺服器的動作存在供應鏈風險,若該伺服器或動作被惡意篡改,可能導致 CI/CD 流程被入侵。建議評估其可信度,或考慮使用官方、廣泛審查過的替代方案,或將其程式碼鏡像到受控的環境中。", + "location": "action.yml:10", + "suggestion": "此 CI/CD 工作流程使用了來自非官方或自託管 Gitea 實例 (https://gitea.jsc.idv.tw) 的外部動作。這引入了供應鏈風險,因為該外部動作的完整性和安全性無法直接保證。建議審查該 Gitea 實例的信任程度,並考慮以下選項:\n1. 如果 `gitea.jsc.idv.tw` 是內部且受信任的實例,請確保其安全措施到位。\n2. 如果可能,將該動作的原始碼鏡像到內部儲存庫,並進行內部審查。\n3. 優先使用來自官方市集或廣泛受信任來源的動作,以降低潛在的惡意程式碼注入風險。", "is_new": true }, { "level": "warning", "role": "Aria", "location": "action.yml:9", - "suggestion": "請將 'NUGET' 更正為正確的專有名詞寫法 'NuGet',以保持命名一致性與正確性。", + "suggestion": "將 'NUGET' 更正為 'NuGet' 以符合官方命名規範及提高可讀性。專有名詞應使用正確的大小寫。", "is_new": true }, { @@ -18,6 +18,6 @@ "role": "Zara", "location": "b/action.yml:10", "suggestion": "建議定期審查並更新 `https://gitea.jsc.idv.tw/actions/cache-nuget` 的版本(目前為 `v0.0.3`)。新版本可能包含效能優化、錯誤修復或新功能,有助於進一步縮短 CI/CD 流程的執行時間,確保持續採用最新的快取策略與技術。", - "is_new": true + "is_new": false } ] From 5f1bcf79e31b0be3a82a37e7527bf607a1bd7f67 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Wed, 13 May 2026 06:24:57 +0000 Subject: [PATCH 5/6] chore: expand ai review exclusions --- .gitea/ai-review/exclusions.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitea/ai-review/exclusions.json b/.gitea/ai-review/exclusions.json index 26de13d..a8eaf55 100644 --- a/.gitea/ai-review/exclusions.json +++ b/.gitea/ai-review/exclusions.json @@ -43,7 +43,17 @@ }, { "id": 9, - "title": "定期審查並更新 cache-nuget 版本", + "title": "定期審查並更新 https://gitea.jsc.idv.tw/actions/cache-nuget 的版本", + "reason": "列入排除問題" + }, + { + "id": 10, + "title": "使用來自非官方或自託管 Gitea 伺服器的外部動作存在供應鏈風險", + "reason": "列入排除問題" + }, + { + "id": 11, + "title": "將 NUGET 更正為 NuGet 的命名建議", "reason": "列入排除問題" } ] From 8f2b784a849ffb15aceb104bd7d932bd544517f5 Mon Sep 17 00:00:00 2001 From: AI Review Bot Date: Wed, 13 May 2026 06:25:54 +0000 Subject: [PATCH 6/6] chore: update ai-review findings [skip ci] --- .gitea/ai-review/findings.json | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.gitea/ai-review/findings.json b/.gitea/ai-review/findings.json index 7a81d27..0654dde 100644 --- a/.gitea/ai-review/findings.json +++ b/.gitea/ai-review/findings.json @@ -1,16 +1,23 @@ [ - { - "level": "warning", - "role": "Rex", - "location": "action.yml:10", - "suggestion": "此 CI/CD 工作流程使用了來自非官方或自託管 Gitea 實例 (https://gitea.jsc.idv.tw) 的外部動作。這引入了供應鏈風險,因為該外部動作的完整性和安全性無法直接保證。建議審查該 Gitea 實例的信任程度,並考慮以下選項:\n1. 如果 `gitea.jsc.idv.tw` 是內部且受信任的實例,請確保其安全措施到位。\n2. 如果可能,將該動作的原始碼鏡像到內部儲存庫,並進行內部審查。\n3. 優先使用來自官方市集或廣泛受信任來源的動作,以降低潛在的惡意程式碼注入風險。", - "is_new": true - }, { "level": "warning", "role": "Aria", "location": "action.yml:9", - "suggestion": "將 'NUGET' 更正為 'NuGet' 以符合官方命名規範及提高可讀性。專有名詞應使用正確的大小寫。", + "suggestion": "建議將 'NUGET' 更正為官方名稱的正確大小寫 'NuGet',以保持命名一致性與專業度。", + "is_new": true + }, + { + "level": "warning", + "role": "Zara", + "location": "action.yml:10", + "suggestion": "建議評估使用官方或社群廣泛維護的快取動作 (例如 `actions/cache`)。自訂的 Gitea 快取動作可能在可靠性、效能最佳化及維護上不如官方動作,且會引入對特定 Gitea 實例的依賴,若該實例不穩定或效能不佳,將影響 CI/CD 流程的效率。", + "is_new": true + }, + { + "level": "warning", + "role": "Rex", + "location": "action.yml:11", + "suggestion": "您正在使用來自外部 Gitea 實例 (`https://gitea.jsc.idv.tw`) 的 GitHub Action。這引入了供應鏈安全風險。如果此外部 Gitea 實例或其上的 Action 遭到入侵,您的工作流程可能會受到惡意程式碼的影響。建議您:\n1. 盡可能使用來自官方或受信任來源(如 GitHub Marketplace 上的驗證發布者)的 Action。\n2. 如果必須使用外部 Action,請徹底審查其原始碼,並考慮將其 Fork 到您的組織或自託管,以確保其內容和安全性。\n3. 確保 `gitea.jsc.idv.tw` 是您完全信任且受控的內部服務,並對其進行適當的安全監控。", "is_new": true }, { @@ -19,5 +26,12 @@ "location": "b/action.yml:10", "suggestion": "建議定期審查並更新 `https://gitea.jsc.idv.tw/actions/cache-nuget` 的版本(目前為 `v0.0.3`)。新版本可能包含效能優化、錯誤修復或新功能,有助於進一步縮短 CI/CD 流程的執行時間,確保持續採用最新的快取策略與技術。", "is_new": false + }, + { + "level": "info", + "role": "Zara", + "location": "action.yml:7-10", + "suggestion": "雖然已引入 NuGet 快取步驟,但此 Git Diff 未顯示快取動作的具體配置(例如 `key` 和 `path` 參數)。請確保快取鍵設計得當,能有效識別依賴項的變化,以最大化快取命中率並避免不必要的重建,進一步提升效能。不當的快取鍵可能導致快取失效或快取過期,反而降低效率。", + "is_new": true } ]