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

Unable to Pin to Specific SHA #775

Open
jeremy-harnois opened this issue Nov 6, 2023 · 0 comments
Open

Unable to Pin to Specific SHA #775

jeremy-harnois opened this issue Nov 6, 2023 · 0 comments

Comments

@jeremy-harnois
Copy link

GitHub's Security hardening for [third-party] GitHub Actions recommends pinning third-party actions to a specific full length SHA:

You can help mitigate this risk by following these good practices:

  • Pin actions to a full length commit SHA

    Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. When selecting a SHA, you should verify it is from the action's repository and not a repository fork.

I tried doing so with uses: int128/hide-comment-action@9526e5fa1c7a9dee4c37bf7b2319d65b3e04e4d1 but encountered an error:

Error: File not found: '/opt/actions-runner/_work/_actions/int128/hide-comment-action/9526e5fa1c7a9dee4c37bf7b2319d65b3e04e4d1/dist/index.js'

Digging in a bit, I see dist/ doesn't exist on checkout and is instead built as part of a release, which is counter to how other actions like actions/checkout are provided.

Please consider having an always-present dist/ so we can pin to specific SHAs (or make a conscious decision otherwise) . Thanks!

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

No branches or pull requests

1 participant