Description
Not sure if this is the right place to report this but couldn't figure out a better place...
I tested the new support for scanning GitHub Actions Workflows and got a ton of findings for "Unversioned Immutable Action".
The description for the finding is confusing me a bit for various reasons. I included a copy of the report I received at the bottom of this issue. My specific confusion is because of
- I'm assuming this is referring to Immutable Actions [GA] roadmap#592 which doesn't appear to be launched yet, is that correct?
- It says "Using an immutable action without indicating proper semantic version will result in the version being resolved to a tag that is mutable." despite the fact that I'm using commit refs (e.g.
actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
). While I might want to switch to immutable actions, I believe the latter half of the sentence is factually incorrect in this case. Also, the use of commit refs is not included in the examples. - The first link, https://github.com/github/package-registry-team/blob/main/docs/immutable-actions/immutable-actions-howto.md, is a 404 for me.
- The second link does not have a target URL (it's
<a href=""></a>
in the page source).
Description
Using an immutable action without indicating proper semantic version will result in the version being resolved to a tag that is mutable. This means the action code can between runs and without the user's knowledge. Using an immutable action with proper semantic versioning will resolve to the exact version
of the action stored in the GitHub package registry. The action code will not change between runs.
Recommendations
When using immutable actions use the full semantic version of the action. This will ensure that the action is resolved to the exact version stored in the GitHub package registry. This will prevent the action code from changing between runs.
Examples
Incorrect Usage
- uses: actions/checkout@some-tag
- uses: actions/[email protected]
Correct Usage
- uses: actions/[email protected]
References