Backport workflow-hardening fix (unpinned-uses) to 5 release branches

Offen
#9,276 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Refactoring
Klarheit
Klar beschrieben
Aktivitätsstatus
Ruhig
Tech-Stack
github-actions
Bereich
ci-cd, release, security

Rechercherichtung

Update .github/workflows/main.yml on each of the five named release branches, starting with the is-release step and the suggested action SHA. Run zizmor and actionlint for each branch to confirm the unpinned-uses findings are cleared without new findings. Done means all five branches use the pinned action and pass both checks.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Summary

The default branch already hardened .github/workflows/main.yml against the issue(s) below, but 5 release branches still carry it. This proposes the same, minimal, scanner-verified fix for each.

What's flagged (by zizmor)
  • unpinned-uses — actions referenced by mutable tag/branch instead of a pinned commit SHA

Already resolved on the default branch in:

Affected release branches (5)
  • release/864.0.0-1 (still present as of HEAD 8190e4d3)
  • release/753.0.0 (still present as of HEAD d5220d9f)
  • release/843.0.0 (still present as of HEAD d42b2df8)
  • release/1058.0.0 (still present as of HEAD 11fadce9)
  • release/939.0.0 (still present as of HEAD 4d77bfb4)
Suggested per-branch patches

Each diff below was checked locally with zizmor and actionlint: the flagged finding(s) are cleared on the affected construct and no new lint or security findings are introduced. (Whitespace is normalized; only security-relevant lines change.)

release/864.0.0-1 — unpinned-uses

File .github/workflows/main.yml; suggested edits:

  • ~ jobs.$J.steps[id=is-release].uses : pin(MetaMask/action-is-release -> target_ref SHA)
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -100,7 +100,7 @@
       IS_RELEASE: ${{ steps.is-release.outputs.IS_RELEASE }}
     steps:
       - id: is-release
-        uses: MetaMask/action-is-release@v2
+        uses: MetaMask/action-is-release@61ff8882da996cb68cdbc8583dc53956a1ffdd8b  # v2
         with:
           commit-starts-with: 'Release [version],Release v[version],Release/[version],Release/v[version],Release `[version]`'
release/753.0.0 — unpinned-uses

File .github/workflows/main.yml; suggested edits:

  • ~ jobs.$J.steps[id=is-release].uses : pin(MetaMask/action-is-release -> target_ref SHA)
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -100,7 +100,7 @@
       IS_RELEASE: ${{ steps.is-release.outputs.IS_RELEASE }}
     steps:
       - id: is-release
-        uses: MetaMask/action-is-release@v2
+        uses: MetaMask/action-is-release@61ff8882da996cb68cdbc8583dc53956a1ffdd8b  # v2
         with:
           commit-starts-with: 'Release [version],Release v[version],Release/[version],Release/v[version],Release `[version]`'
release/843.0.0 — unpinned-uses

File .github/workflows/main.yml; suggested edits:

  • ~ jobs.$J.steps[id=is-release].uses : pin(MetaMask/action-is-release -> target_ref SHA)
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -100,7 +100,7 @@
       IS_RELEASE: ${{ steps.is-release.outputs.IS_RELEASE }}
     steps:
       - id: is-release
-        uses: MetaMask/action-is-release@v2
+        uses: MetaMask/action-is-release@61ff8882da996cb68cdbc8583dc53956a1ffdd8b  # v2
         with:
           commit-starts-with: 'Release [version],Release v[version],Release/[version],Release/v[version],Release `[version]`'
release/1058.0.0 — unpinned-uses

File .github/workflows/main.yml; suggested edits:

  • ~ jobs.$J.steps[id=is-release].uses : pin(MetaMask/action-is-release -> target_ref SHA)
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -104,7 +104,7 @@
       IS_RELEASE: ${{ steps.is-release.outputs.IS_RELEASE }}
     steps:
       - id: is-release
-        uses: MetaMask/action-is-release@v2
+        uses: MetaMask/action-is-release@61ff8882da996cb68cdbc8583dc53956a1ffdd8b  # v2
         with:
           commit-starts-with: ${{ vars.RELEASE_COMMIT_PREFIX }}
release/939.0.0 — unpinned-uses

File .github/workflows/main.yml; suggested edits:

  • ~ jobs.$J.steps[id=is-release].uses : pin(MetaMask/action-is-release -> target_ref SHA)
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -102,7 +102,7 @@
       IS_RELEASE: ${{ steps.is-release.outputs.IS_RELEASE }}
     steps:
       - id: is-release
-        uses: MetaMask/action-is-release@v2
+        uses: MetaMask/action-is-release@61ff8882da996cb68cdbc8583dc53956a1ffdd8b  # v2
         with:
           commit-starts-with: ${{ vars.RELEASE_COMMIT_PREFIX }}

Happy to open pull requests instead if that's preferred.

Vorherrschende Sprache
TypeScript
Sterne
424
Forks
311
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
446

Entwicklungsumgebung

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

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 MetaMask/core

Alle Issues in MetaMask/core

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

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