-
Notifications
You must be signed in to change notification settings - Fork 61
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
Create Pages site failed: Resource not accessible by integration #40
Comments
Unfortunately, we needed to disable this functionality -- hopefully just temporarily 🤞🏻 -- due to a security bug bounty. 🛡️ We have a task in our backlog to investigate what it would take to reenable this. If we can't, we will cut a new major version bump of this Action to remove the enablement functionality. |
Thanks for the response, could you elaborate more on that? Is the security bug only with this action, or is it something larger? Because I'm also getting this error on Is this documented or noted anywhere what systems are limited? |
The security bug was specifically about allowing GitHub Apps (including the Actions' As for better understanding the permissions and limitations applied to GitHub Apps for accessing certain REST API resources, this documentation is probably your best bet: In the Pages section of that page, you can see the REST API endpoints for creating and deleting Pages sites are currently omitted. |
Thank you for the clarification. I'll keep an eye on this for enabling Pages automatically. Could you comment on my other issue though? On that permissions page you linked, the "updating a repo" endpoint is still there: https://docs.github.com/en/rest/overview/permissions-required-for-github-apps#administration
Which seems to be failing when run from an Action (which have write permissions enabled by default). Are you sure there's not some wider disabling going on here? Sorry of this is off-topic, but I also don't know where I would even report/ask about something like this. It also seems like it might not be a coincidence and unexpectedly related to this issue. |
Definitely off-topic. 😅 In the future, probably create a new discussion on the community forums: /~https://github.com/community/community/discussions The Actions-provided You'll notice there is no equivalent to the category you're wanting to modify, e.g. you're wanting something like You could create your own GitHub App if you want to work with extra APIs like that, otherwise you can always use a Personal Access Token to act as a user instead of using |
Sorry for being off topic, I should've thought to post in the general discussions. I was very much misunderstanding the distinction between Actions permissions and the API as a whole. I've created a discussion here for anyone interested: community/community#40279 Back on topic, is there any place to track the status of this security bug so I can know when a decision is made one way or another? |
There is not, as we keep security vulnerabilities close to the vest until they're fully addressed. However, I had already added a note into our internal issue to post an update here once we proceed. 📝 |
ℹ️ We were able to partially re-enable REST APIs to create and/or delete a Pages site, but ONLY for user-to-server tokens (e.g. Personal Access Tokens or OAuth tokens). As such, it still won't work with the I'll update this Action soon to change the default behavior to NOT attempt to create/enable the Pages site if it's missing. Update: |
Apologies, slight clarification: you can now also use server-to-server App tokens again as well but ONLY if they have been granted both the The |
Should y'all update /~https://github.com/actions/starter-workflows/blob/main/pages/static.yml to reflect this, seeing as its been ~2 months and this is still an issue? Not totally clear what the proper way to set this up is at the moment, could y'all maybe provide an example .yml using a classic PAT, as well as which permissions the PAT needs? |
I created a classic PAT with all permissions, set in as an env secret as
and I'm getting this as output
|
Is there a way this step can be skipped / removed?
The question still stands, can I manually set up pages and then not need this step? |
The short answer is yes, if you go to settings -> pages and change the source drop-down to GitHub actions, this step will pass without needing a custom token / extra changes. |
@acdoussan Part of what you described was actually a bug that I introduced with enablement in the See #50, |
All good, glad it's fixed! Hopefully, the manual step helps anyone else who comes stumbling along 😃. |
Related: actions/starter-workflows#332
The repo's actions permissions are already set to read and write by default. Also tried setting
permissions: write-all
on the job. Also tried triggering onpush
, which I could've sworn was working yesterday. Nothing is working today.I also tried enabling Pages more directly with the GitHub API, and still got an error:
The text was updated successfully, but these errors were encountered: