-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add global permissions #609
Conversation
github-actions/src/main/scala/org/typelevel/sbt/gha/PermissionScope.scala
Outdated
Show resolved
Hide resolved
github-actions/src/main/scala/org/typelevel/sbt/gha/PermissionScope.scala
Outdated
Show resolved
Hide resolved
github-actions/src/main/scala/org/typelevel/sbt/gha/PermissionScope.scala
Outdated
Show resolved
Hide resolved
…Scope.scala Co-authored-by: Arman Bilge <[email protected]>
…Scope.scala Co-authored-by: Arman Bilge <[email protected]>
…Scope.scala Co-authored-by: Arman Bilge <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple nits but looks good to go. I like how this turned out!
Note for posterity: we had some discussion on Discord about whether to explicitly set permissions for the build, publish, site, etc. jobs. The tricky thing is it's hard to know exactly what permissions are required, particularly if the user has added some custom workflow steps. It's a bit annoying because as soon as we specify a few permissions for the things we know we need, we have to specify all the permissions with no way of falling back to the defaults that the user has set in their repository settings. So it's not very compositional.
I'm not entirely convinced how much security benefit it would bring either. So I think opt-in is okay for now, and we can revisit in the future.
github-actions/src/main/scala/org/typelevel/sbt/gha/GenerativePlugin.scala
Show resolved
Hide resolved
github-actions/src/main/scala/org/typelevel/sbt/gha/PermissionScope.scala
Outdated
Show resolved
Hide resolved
…Scope.scala Co-authored-by: Arman Bilge <[email protected]>
@armanbilge did one more optimization by moving the string rendering to the Permissions classes. If you don't like that approach, no worries, we can revert the commit. |
github-actions/src/main/scala/org/typelevel/sbt/gha/PermissionScope.scala
Outdated
Show resolved
Hide resolved
Oh yeah, maybe just leave it the way it was. It was fine and I think following the existing style of the project. |
Reverted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
See sbt/sbt-github-actions#105