CI: do not persist the checkout token, and test the minimum supported Node

未關閉 適合新手
#111 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
68/100
Issue 類型
重構
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
git, github-actions, nodejs

研究方向

從 .github/workflows/ci.yml 和 .github/workflows/deploy.yml 開始,這兩個檔案中的 actions/checkout 步驟都需要 persist-credentials: false。對於 Node 這一項,比較 package.json 的 engines、.nvmrc 和 .github/dependabot.yml,然後與維護者決定是新增 Node 22 的矩陣項目,還是將 engines 提升到 24。當兩個工作流在 checkout 修改後都通過,且 CI 測試的是 engines 宣告的版本時,即完成。

由索引模型根據 Issue 內容生成。

描述

ci good first issue severity: low

Summary

Two small gaps in the GitHub Actions workflows: the checkout step leaves the job token in the local git config while dependency scripts run, and CI only tests Node 24 although the project says it supports Node 22.12 and later.

Checklist

  • Do not persist the checkout token. .github/workflows/ci.yml:18 and .github/workflows/deploy.yml:24 use actions/checkout without persist-credentials: false, so the job's GITHUB_TOKEN stays in .git/config while npm ci, lint, tests and the build run code from node_modules. The token is already least-privilege (contents: read, plus pages: read in the deploy build job), and nothing later in either job uses git with it, so add with: { persist-credentials: false } to both checkout steps. This is defence in depth: it matters if job permissions are widened later.
  • Test the oldest supported Node. package.json:7-9 declares "node": ">=22.12" and Dependabot pins @types/node to the oldest supported major (.github/dependabot.yml:15-17), but .nvmrc and both workflows use Node 24 only (ci.yml:21). Either add a Node 22 leg to ci.yml, or raise engines to >=24 and move @types/node to 24.

Acceptance criteria

  • Both checkout steps set persist-credentials: false, and both workflows still pass.
  • CI runs the declared minimum Node version, or engines matches what CI tests.

Getting started

  • Relevant files: .github/workflows/ci.yml, .github/workflows/deploy.yml, package.json, .nvmrc, .github/dependabot.yml
  • Related: #20, #23

Filed by repo-audit/full-audit at de2b25b. Severity: low. Effort: S. audit-key: ci|.github/workflows/ci.yml|actions/checkout persist-credentials

主要語言
TypeScript
星號
3
分支
3
平均合併
8 小時 13 分鐘
30 天內合併 PR
2

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TMHSDigital/GH-Arcade 的其他 Issue

查看 TMHSDigital/GH-Arcade 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。