Skip to content

feat: use sha for actions #1825

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

Merged

Conversation

maxday
Copy link
Member

@maxday maxday commented May 22, 2025

Fixes #1769

The original issue mentioned that it should only apply to non github-vended actions but I think it's safer to apply it everywhere. For instance actions/cache has 100+ contributors, and not all of them are from the official GitHub org.
The sha was already set for some github-vended actions in some workflows but it was inconsistent, this PR adds shas for 100% of actions

@maxday maxday requested a review from a team as a code owner May 22, 2025 01:08
@pragmaticivan
Copy link
Member

I'm ok with SHA for all, but there is a benefit when we use major versions from GH org (less PRs to review is one of them)

@maxday
Copy link
Member Author

maxday commented May 23, 2025

I think dependabot is a great ally for this use case, but I'm ok to revert the change for GitHub-vended actions. Let me know!

@serkan-ozal
Copy link
Contributor

Actually, both approaches have their own pros and cons, but, yes, using SHA is the recommended approach by Github especially in terms of security. Also, pinning actions by SHA helps to have better OSSF score:

So, I am personally OK with these changes.
@tylerbenson WDYT?

Copy link
Member

@pragmaticivan pragmaticivan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@tylerbenson tylerbenson left a comment

Choose a reason for hiding this comment

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

Does dependabot maintain the version in comments? I appreciate that and hope it does. The main thing that I don't like about SHAs is the version number is opaque.

@pragmaticivan
Copy link
Member

Does dependabot maintain the version in comments? I appreciate that and hope it does. The main thing that I don't like about SHAs is the version number is opaque.

Yes, dependabot will update the comments

@serkan-ozal
Copy link
Contributor

Yes, comments are updated too. So, merging this one too.

@serkan-ozal serkan-ozal merged commit 4e8e1d6 into open-telemetry:main May 26, 2025
23 checks passed
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.

Use commit SHA for ALL github actions, except the ones provided by Github (actions/*)
4 participants