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

Offen Anfängerfreundlich
#111 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
68/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
git, github-actions, nodejs
Bereich
build-system, ci-cd

Rechercherichtung

Beginne mit .github/workflows/ci.yml und .github/workflows/deploy.yml, wo beide actions/checkout-Schritte persist-credentials: false benötigen. Vergleiche für den Node-Punkt package.json engines, .nvmrc und .github/dependabot.yml, und entscheide dann mit einem Maintainer, ob ein Node-22-Matrix-Eintrag hinzugefügt oder engines auf 24 angehoben wird. Fertig, wenn beide Workflows mit der Checkout-Änderung laufen und CI die Version testet, die engines deklariert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
TypeScript
Sterne
3
Forks
3
Ø Merge
8 Std. 13 Min.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TMHSDigital/GH-Arcade

Alle Issues in TMHSDigital/GH-Arcade

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.