lincc-frameworks / lincc-frameworks/python-project-template

Change third party github actions to target specific commits rather than tags

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

Nessuno ha ancora preso questa issue.

Lingua principale
Jinja
Stelle
85
Fork
16
Merge medio
6h 18m
PR unite (30g)
1

Descrizione

We should pin our third party github actions to a specific commit, rather than a tag as we currently do.

This is a cybersecurity measure [recommended by GitHub](https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions):
> The individual jobs in a workflow can interact with (and compromise) other jobs. For example, a job querying the environment variables used by a later job, writing files to a shared directory that a later job processes, or even more directly by interacting with the Docker socket and inspecting other running containers and executing commands in them.

> This means that a compromise of a single action within a workflow can be very significant, as that compromised action would have access to all secrets configured on your repository, and may be able to use the GITHUB_TOKEN to write to the repository. Consequently, there is significant risk in sourcing actions from third-party repositories on GitHub. For information on some of the steps an attacker could take, see [Secure use reference](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#potential-impact-of-a-compromised-runner).

In our workflows, we have some third party actions used like such:
```
- name: Install uv
uses: astral-sh/setup-uv@v7
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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.

Direzione di ricerca

Inizia cercando nei file di workflow del repository le GitHub Actions di terze parti, incluso l'esempio astral-sh/setup-uv@v7. Fissa ogni action di terze parti su un commit specifico invece che su un tag, quindi esegui i controlli di workflow disponibili per confermare che continuino a superare i controlli.

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

Valutazione

Stack tecnologico
github-actions
Ambito
ci-cd, security
Tipo di issue
Refactoring
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
65/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.