Skip to content

Pin GitHub Actions to Git commit hash #27

Open
@achrinza

Description

@achrinza

Currently, we're inconsistently referencing third-party GitHub Actions by Git tags, Git branches and the Git commit hash.

Git tags and Git branches can be re-pointed to a different Git commit hash without our explicit knowledge. Hence, this poses a security risk as a malicious GitHub Action that we depend on can go under the radar without our knowledge.

We should standardise on referencing by Git commit hash.

Renovate currently handles keeping the GitHub Actions up-to-date. It supports updating Git commit hash while following the Git tags:

The syntax would be either of the following:

- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # renovate: tag=v2.4.0
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # tag=v2.4.0
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0

Loosely-related to #25 (Part of OpenSSF Scorecard check).

GitHub repositories

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Current/Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions