CI: pin third-party GitHub Actions to commit SHAs (write-scoped jobs first)

Aperta
#198 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, yaml
Ambito
ci-cd, security

Direzione di ricerca

Start by reading .github/workflows/containers.yml and .github/workflows/release.yml, focusing on jobs with write permissions and their uses: references. Pin third-party actions to full 40-character commit SHAs and retain each version tag in a trailing comment; decide whether to include actions/* and github/* as the issue requests. The work is done when the targeted references are pinned and workflow validation passes; the optional CI check can be considered separately.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

ci

Every action in .github/workflows/ is referenced by tag (azure/[email protected], docker/login-action@v4, aquasecurity/[email protected], …). A tag can be moved by the action's owner, so a compromised or re-pointed tag would run in our jobs, including the ones that hold packages: write or contents: write:

  • containers.yml: the image build/push jobs (docker/login-action, docker/build-push-action, docker/bake-action, docker/metadata-action, docker/setup-buildx-action, docker/setup-qemu-action) and, since R-9 (#196), chart-push (azure/[email protected], which resolves to 9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 today).
  • release.yml: the release job.

An automated security review flagged the chart-push reference after #196 merged. It was left as a tag there because that is the convention every other reference in the repo follows; changing one reference would not change the exposure.

Task

  • Pin every third-party action (everything outside actions/* and github/*; decide whether to pin those too) to a full 40-character commit SHA with the tag in a trailing comment, e.g. uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1. Start with the jobs that hold write permissions.
  • Dependabot's github-actions ecosystem is already configured and updates SHA pins with their comments.
  • Optionally add a check (actionlint cannot do this; a small script or zizmor) so a new tag-pinned third-party action fails CI.

Lead-only steps

None.

Lingua principale
Python
Stelle
0
Fork
2
Merge medio
8h 26m
PR unite (30g)
47

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TechTraverse/stac-higher

Tutte le issue di TechTraverse/stac-higher

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.