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

Explicitly specify workflow permissions required to succeed when our org switches default access from 'permissive' to 'restricted' #441

Merged
merged 7 commits into from
Sep 20, 2021

Conversation

QuintinWillison
Copy link
Contributor

@QuintinWillison QuintinWillison commented Sep 18, 2021

This pull request started out as an experiment (see initial commit message).

It has now matured to become a change we need to make to this repository in order to allow the docs workflow to continue functioning when our org default permissions scope changes from 'permissive' to 'restricted'. More on that in this internal Slack thread.

…ll workflows.

see: https://docs.github.com/en/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token

This is an experiment to explore what will break when we switch our org level default from 'permissive' to 'restricted'.

see also: actions/upload-artifact#197 (comment)
@QuintinWillison QuintinWillison self-assigned this Sep 18, 2021
They're not supported in the workflow syntax, yet they're referenced elsewhere in the docs in relation to the GITHUB_TOKEN, which is what confused me.
@QuintinWillison
Copy link
Contributor Author

Somewhat opaque failure in the docs workflow:

Error: Resource not accessible by integration

Not unexpected, but the mission now is to work out what permission(s) is/are needed to fix that.

That can contribute to the solution for ably/sdk-upload-action#29.

@github-actions github-actions bot temporarily deployed to staging/pull/441/dokka September 18, 2021 03:34 Inactive
Now that I know the docs workflow is working, I want to confirm my understanding (from the GitHub docs) that the entire set of permissions we define here will completely override the entire set of permissions set by default for the org.

i.e. my expected outcome from this workflow in CI is for it to fail.
@github-actions github-actions bot temporarily deployed to staging/pull/441/dokka September 18, 2021 04:02 Inactive
…maining satisfied when the org default moves from 'permissive' to 'restricted'.
@github-actions github-actions bot temporarily deployed to staging/pull/441/dokka September 18, 2021 04:12 Inactive
@QuintinWillison QuintinWillison changed the title Experiment: GitHub Permissions Explicitly specify workflow permissions required to succeed when our org switches default access from 'permissive' to 'restricted' Sep 18, 2021
@QuintinWillison QuintinWillison marked this pull request as ready for review September 18, 2021 04:14
GitHub was happy to run the workflow with an unknown key alongside the step. Plus I hadn't read the docs properly (i.e. to acknowledge that permissions can be applied at workflow root or job level, but not at step level).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants