-
Notifications
You must be signed in to change notification settings - Fork 6
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
version check makes it impossible to use the action with a certain commit #113
Comments
Looks like the action version is used for the download, so I see why. It's just a bit unconventional to not allow this. Especially since many people prefer the commit vs a fluent version like |
Because this action is written in Go, the option to checkout and compile at runtime was just too slow that we didn't want to ship it. Instead, we build the binary for master and for tags and use the tag to decide what to only download the prebuilt binary. |
Would it be possible to add a input variable to the action to specify which version of the go binary to use? I'd like to lock the github action to a specific SHA commit hash and I am hitting this issue. |
Hey @sdemjanenko Thanks for reaching out. If I understand correctly, you want to use a specific SHA commit id for the version when using it, i.e
Instead of using a specific tag:
Since the action shim, looks at version tags to decide what version of the Did I get that right? |
@rotemtam yes that is correct. I wonder if something like
could be a solution. Also if I wanted to set up a stricter configuration, I might want to set a checksum for the binary
and in this case the action would checksum the binary and make sure it matches before executing. |
I understand the need and the suggestion, but I don't love having two different ways of achieving the same thing. Why is pinning the action version tag an issue? |
For me, I'd like to have an option when I update to address maybe necessary changes vs getting failed builds etc. when I least expect or need it. Same with all other software. |
@till , I understand that, but you can pin a specific tag such as |
@rotemtam pinning the action is a security best practice. Here is a recent article talking about how github actions aren't pinned enough: https://devops.com/report-surfaces-thousands-of-potential-vulnerabilities-in-github-workflows/amp/. Also here is a tool that I am using to automatically flag if my github actions have this problem: https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions |
Sorry for the late reply. For me that includes the action itself. Rather have dependabot send me a PR, etc.. |
Kinda a follow-up to #112, I wanted to test the action and pin it to a commit. But it seems like the option is to run your actions with
...@vVERSION
or...@master
. Neither might be desirable to test unreleased code.The offending lines are here:
https://github.com/ariga/atlas-action/blob/master/shim/index.js#L18-L28
Is there a good reason to bail there?
The text was updated successfully, but these errors were encountered: