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

[Core feature request] Pinning action versions to commit hashes updateable by bots #1691

Open
krzema12 opened this issue Oct 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@krzema12
Copy link
Member

krzema12 commented Oct 24, 2024

What feature do you need?
By default, when using a binding provided by the bindings server, we refer by the major or full version. It can be a branch or a tag. While major version tags/branches change and it's expected, full versions shouldn't. However, technically nothing stops the action owner to hard-reset some full version branch/tag to point to a different commit, and no one will notice it.

That's why, as a part of security hardening, some workflow owners use full SHA-1 of commits they want to use for each action. It guarantees the action's code won't silently change.

Users of github-workflows-kt can already do it using _customVersion constructor argument:

UploadArtifact(
    // ...
    _customVersion = "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11",
)

However, dependency updating bots cannot update such commit hashes.

In theory we could try allowing such format when specifying a dependency on an action:

@file:DependsOn("actions:checkout:b4ffde65f46336ab88eb53be808477a3936bae11")

but then, even if we make this commit hash be updated to the right value, there's no mechanism to keep the full version in the comment, like shown in the below example.

Do you have an example usage?

uses: 'actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11' # v4.1.1

Is there a workaround for not having this feature? If yes, please describe it.
No way to make the dependency updating bots work, just specifying the commit hash as version.

@krzema12 krzema12 added the enhancement New feature or request label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant