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

Pin GHA versions #2679

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Pin GHA versions #2679

wants to merge 5 commits into from

Conversation

sergejparity
Copy link

In order to improve our security posture with GitHub Actions usage. I've made a version pinning ether to commit hash or to specific version.

Related issues and policy:
https://github.com/paritytech/ci_cd/issues/464
https://github.com/paritytech/ci_cd/wiki/Policies-and-regulations:-GitHub-Actions-usage-policies

@sergejparity sergejparity requested a review from a team August 24, 2022 06:24
@github-actions
Copy link
Contributor

github-actions bot commented Aug 24, 2022

twiggy diff report

Difference in .wasm size before and after this pull request.


 Delta Bytes │ Item
─────────────┼──────────────────
          +0 ┊ Σ [0 Total Rows]

@tomaka
Copy link
Contributor

tomaka commented Aug 25, 2022

I'm off for a few days, and I'll deal with this afterwards. If this PR gets merged beforehand I'll revert it when I'm back.

@sergejparity
Copy link
Author

sergejparity commented Aug 25, 2022

No problem. I'll leave it hanging for now.

@@ -60,13 +60,13 @@ jobs:
const fs = require('fs');
return fs.readFileSync('./number', 'utf8').toString();
result-encoding: string
- uses: peter-evans/find-comment@v2
- uses: peter-evans/find-comment@1769778a0c5bd330272d749d12c036d65e70d39d # v2.0.0
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious: why not pin to v2.0.0?

Suggested change
- uses: peter-evans/find-comment@1769778a0c5bd330272d749d12c036d65e70d39d # v2.0.0
- uses: peter-evans/find-comment@v2.0.0

Copy link
Author

Choose a reason for hiding this comment

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

It's pretty simple. When you point to the tag, then in case if GHA repo will get compromised (which is out of our control), tag can be easily moved to another commit, branch etc. opening the gate for some malicious manipulations - like the one described here. And we will not even get notified about such events.
With the hash such things will not work.
Yes, it might be not so convenient, but it is an eternal trade off - security vs convenience.
Also dependabot can track GHA updates by the hash as well.

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.

None yet

4 participants