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

Set the permissions of GitHub actions #2681

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

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Aug 24, 2022

Close #2679
I'm opening this as an alternative to #2679

Rather than pinning actions to a certain commit, we just prevent actions from doing anything problematic.

If you're ok with that approach, I'll fix the TODOs that I've left in the PR.

@tomaka tomaka requested a review from a team August 24, 2022 07:46
Copy link
Contributor

@mergify mergify bot left a comment

Choose a reason for hiding this comment

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

Automatically approving tomaka's pull requests. This auto-approval will be removed once more maintainers are active.

@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]

@sergejparity
Copy link

Actually I would prefer to pin GHA's as well for sake of uniformity of how they are handled throughout an org. Your change of permissions will greatly compliments that as well.

@tomaka
Copy link
Contributor Author

tomaka commented Aug 24, 2022

What the advantage of having uniformity through the org?

Also, I don't understand the idea behind pinning commit hashes. Does that mean that I can never ever update these specific actions?

@sergejparity
Copy link

There is no problem with action updates. Dependabot also is working with commit hashes matching them with new releases.

What goes to uniformity we were requested by security team to standardize the approach how GHA's defined in our repos. Based on this https://forum.parity.io/t/github-actions-gha-versioning-updates-and-security/953/11 conversation the policy was created https://github.com/paritytech/ci_cd/wiki/Policies-and-regulations:-GitHub-Actions-usage-policies

@tomaka
Copy link
Contributor Author

tomaka commented Aug 24, 2022

There is no problem with action updates. Dependabot also is working with commit hashes matching them with new releases.

What's the point of pinning by hash if we let dependabot just update these hashes liberally? Are we supposed to review the code of every action every time a dependabot PR wants to update it?

@sergejparity
Copy link

What's the point of pinning by hash

Hash is hard to counterfeit. Tag can be easily moved to another commit and nobody even notice it.

@tomaka
Copy link
Contributor Author

tomaka commented Aug 24, 2022

I understand the advantage of hash as opposed to version, what I'm saying is that "hash + dependabot" together seems contradictory.
To me, to be coherent, it should be either "pin by hash and never update any action", or "use dependabot and don't care about hashes or versions".

@sergejparity
Copy link

Reason is pretty simple to get notified about that something has changed in third party GHA. Although it was mentioned in the forum discussion, that we do not have a capacity to perform full audit of changes, but at least there is a chance to avoid similar to this issues

@sergejparity sergejparity self-requested a review August 25, 2022 14:56
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

2 participants