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

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

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

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Jinja
Sterne
85
Forks
16
Ø Merge
6 Std. 18 Min.
Gemergte PRs (30 T.)
1

Beschreibung

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
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die Workflow-Dateien des Repositorys nach GitHub Actions von Drittanbietern zu durchsuchen, einschließlich des Beispiels astral-sh/setup-uv@v7. Pinne jede Action eines Drittanbieters auf einen bestimmten Commit statt auf einen Tag und führe anschließend die verfügbaren Workflow-Prüfungen aus, um zu bestätigen, dass sie weiterhin erfolgreich sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github-actions
Bereich
ci-cd, security
Issue-Typ
Refactoring
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
65/100

Neue Issues direkt in Ihr Postfach

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