11 Commits

5 changed files with 88 additions and 6 deletions
+46 -1
View File
@@ -6,6 +6,11 @@
"title": "使用來自非官方來源的自訂 Action 的供應鏈風險",
"reason": "列入排除問題"
},
{
"id": 2,
"title": "Composite Action 將 shell 移到 runs 層級",
"reason": "列入排除問題"
},
{
"id": 3,
"title": "cache-nuget@v0.0.3 釘選到修補版本",
@@ -13,8 +18,48 @@
},
{
"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": "列入排除問題"
},
{
"id": 8,
"title": "審查 https://gitea.jsc.idv.tw/actions/cache-nuget@v0.0.3 的來源和內容",
"reason": "列入排除問題"
},
{
"id": 9,
"title": "定期審查並更新 https://gitea.jsc.idv.tw/actions/cache-nuget 的版本",
"reason": "列入排除問題"
},
{
"id": 10,
"title": "使用來自非官方或自託管 Gitea 伺服器的外部動作存在供應鏈風險",
"reason": "列入排除問題"
},
{
"id": 11,
"title": "將 NUGET 更正為 NuGet 的命名建議",
"reason": "列入排除問題"
},
{
"id": 12,
"title": "移除 NuGet restore 步驟的建議(action.yml:9",
"reason": "審查意見:建議移除或改為使用快取以避免每次工作流程下載相依套件;此項目列入排除"
}
]
}
+37
View File
@@ -0,0 +1,37 @@
[
{
"level": "warning",
"role": "Aria",
"location": "action.yml:9",
"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
},
{
"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": false
},
{
"level": "info",
"role": "Zara",
"location": "action.yml:7-10",
"suggestion": "雖然已引入 NuGet 快取步驟,但此 Git Diff 未顯示快取動作的具體配置(例如 `key` 和 `path` 參數)。請確保快取鍵設計得當,能有效識別依賴項的變化,以最大化快取命中率並避免不必要的重建,進一步提升效能。不當的快取鍵可能導致快取失效或快取過期,反而降低效率。",
"is_new": true
}
]
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
- name: 發布專案
uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }}
with:
tag_name: "v${{ needs.version.outputs.version }}"
tag_name: v${{ needs.version.outputs.version }}
- name: 清理成品
uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }}
with:
+4
View File
@@ -1,6 +1,8 @@
name: AI
on:
pull_request:
branches-ignore:
- master
types: [opened, synchronize]
jobs:
code-review:
@@ -10,6 +12,8 @@ jobs:
- name: AI Code Review
uses: https://gitea.jsc.idv.tw/actions/code-review@${{ vars.ACTION_CODE_REVIEW_VERSION }}
with:
GITEA_TOKEN: ${{ secrets.RUNNER_TOKEN }}
GITEA_COMMENT_TOKEN: ${{ secrets.GITEA_TOKEN }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }},${{ secrets.GEMINI_API_KEY_1 }},${{ secrets.GEMINI_API_KEY_2 }},${{ secrets.GEMINI_API_KEY_3 }},${{ secrets.GEMINI_API_KEY_4 }},${{ secrets.GEMINI_API_KEY_5 }},${{ secrets.GEMINI_API_KEY_6 }},${{ secrets.GEMINI_API_KEY_7 }},${{ secrets.GEMINI_API_KEY_8 }},${{ secrets.GEMINI_API_KEY_9 }},${{ secrets.GEMINI_API_KEY_10 }},${{ secrets.GEMINI_API_KEY_11 }},${{ secrets.GEMINI_API_KEY_12 }},${{ secrets.GEMINI_API_KEY_13 }},${{ secrets.GEMINI_API_KEY_14 }},${{ secrets.GEMINI_API_KEY_15 }},${{ secrets.GEMINI_API_KEY_16 }},${{ secrets.GEMINI_API_KEY_17 }},${{ secrets.GEMINI_API_KEY_18 }},${{ secrets.GEMINI_API_KEY_19 }}
GEMINI_BASE_URL: https://generativelanguage.googleapis.com/v1beta
GEMINI_MODEL: ${{ vars.GEMINI_MODEL }}
-4
View File
@@ -6,11 +6,7 @@ runs:
steps:
- name: 取得專案
uses: actions/checkout@v6
- name: 快取 NUGET 套件
id: cache-nuget
uses: https://gitea.jsc.idv.tw/actions/cache-nuget@v0.0.3
- name: 復原專案
if: steps.cache-nuget.outputs.cache-hit != 'true'
run: |
if [[ -f "nuget.config" ]]; then
dotnet restore --configfile nuget.config