Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade GitHub actions & pin to commit hash #2598

Merged

Conversation

Marcono1234
Copy link
Collaborator

Purpose

  • Upgrade GitHub actions & pin to commit hash
  • Enable Dependabot for GitHub actions

Description

See the commit messages for additional information.

Pinning the GitHub actions to a commit hash is recommended for increased security, in case a malicious user gains write access to the repository of an action and changes the Git tags. Though for most of the actions we use the risk of this seems rather low since the actions are maintained by GitHub.

Using Dependabot for the GitHub actions makes sure no deprecated versions are used by accident (such as the recently deprecated CodeQL Action v2). We will have to make sure though that Dependabot version updates don't contain any breaking changes, but hopefully the maintainers follow SemVer, so this should hopefully be easy to notice.

Marcono1234 and others added 3 commits January 14, 2024 21:55
The only exception is `google/oss-fuzz` which does not seem to have releases
or Git tags, so pinning might not make sense there.

Also adds `actions/setup-java` to the `codeql-analysis` workflow to
explicitly specify the JDK version to use (and to use the caching of
that action) instead of relying on the default JDK of the runner image.
Copy link
Member

@eamonnmcmanus eamonnmcmanus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eamonnmcmanus eamonnmcmanus merged commit 87a3913 into google:main Jan 29, 2024
11 checks passed
@Marcono1234 Marcono1234 deleted the marcono1234/github-actions-update branch January 30, 2024 22:10
tibor-universe pushed a commit to getuniverse/gson that referenced this pull request Sep 14, 2024
* Upgrade GitHub actions & pin to commit hash

The only exception is `google/oss-fuzz` which does not seem to have releases
or Git tags, so pinning might not make sense there.

Also adds `actions/setup-java` to the `codeql-analysis` workflow to
explicitly specify the JDK version to use (and to use the caching of
that action) instead of relying on the default JDK of the runner image.

* Enable Dependabot for GitHub actions

---------

Co-authored-by: Éamonn McManus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants