Pin workflow actions to commit SHAs and npm exactly in publish

Offen
#117 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
github-actions, typescript
Bereich
ci-cd, security

Rechercherichtung

Start with .github/workflows/publish.yml and compare its uses: references and npm install command with the suggested changes; then inspect release.yml, drift-check.yml, ci.yml, pages.yml, stale.yml, and label-sync.yml for the remaining action references. Pin actions to full commit SHAs, select an exact npm version, and apply the listed publish workflow changes. Done when the requested workflow hardening is reflected in those files.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

dependencies severity: low

Summary

Every workflow uses: points at a mutable tag, including in the publish job that holds id-token: write for npm trusted publishing. publish.yml also installs a floating npm version. This is hardening; there is no known exploit.

Where

  • .github/workflows/publish.yml:8-10, .github/workflows/publish.yml:19-27 (actions/checkout@v7 and actions/setup-node@v7 under id-token: write; npm install -g npm@^11.5.1; cache: npm)
  • .github/workflows/release.yml (contents: write, actions: write)
  • .github/workflows/drift-check.yml:18 (a third-party org action @v1.20)
  • every other uses: in ci.yml, pages.yml, stale.yml and label-sync.yml

Suggested fix

  • Pin actions to full commit SHAs with a # vX.Y comment, at least in publish.yml and release.yml. Dependabot already watches github-actions and will bump the SHAs.
  • Pin npm to an exact version in publish.yml.
  • Drop cache: npm from the publish job, so a poisoned cache cannot reach the token-minting job.
  • Consider npm ci --ignore-scripts before the build in publish.

Getting started

  • Relevant files: .github/workflows/*.yml

Filed by repo-audit/full-audit at e836036. Severity: low. Effort: S. audit-key: dependencies|.github/workflows/publish.yml|uses

Vorherrschende Sprache
TypeScript
Sterne
0
Forks
6
Ø Merge
1 T. 21 Std.
Gemergte PRs (30 T.)
8

Entwicklungsumgebung

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/godot-correctness-mcp

Alle Issues in TMHSDigital/godot-correctness-mcp

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

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