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

Repository Contents API Token Scope Requirement is Misleading #27413

Closed
1 task done
AdnaneKhan opened this issue Aug 12, 2023 · 3 comments
Closed
1 task done

Repository Contents API Token Scope Requirement is Misleading #27413

AdnaneKhan opened this issue Aug 12, 2023 · 3 comments
Labels
content This issue or pull request belongs to the Docs Content team

Comments

@AdnaneKhan
Copy link

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#create-or-update-file-contents

What part(s) of the article would you like to see updated?

The documentation for the repository contents API states that a token with the workflow scope is needed. This is misleading because a token with workflow scope is only needed if you are making changes to files within .github/workflows/. This could lead to end-users generating over-provisioned tokens when they do not need them. A workflow scoped PAT has repo write access and can trivially access all repo/org shared secrets.

It would be good if the documentation specified that workflow scope is only needed if the use case requires changes to workflow files. If not, then a repo scoped token is sufficient.

Additional information

No response

@AdnaneKhan AdnaneKhan added the content This issue or pull request belongs to the Docs Content team label Aug 12, 2023
@welcome
Copy link

welcome bot commented Aug 12, 2023

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Aug 12, 2023
@cmwilson21
Copy link
Contributor

@AdnaneKhan Thanks so much for opening an issue! I'll triage this for the team to take a look 👀

@cmwilson21 cmwilson21 added rest-description and removed triage Do not begin working on this issue until triaged by the team labels Aug 14, 2023
@docs-bot
Copy link
Collaborator

Thank you for opening this issue! Updates to the REST API, GraphQL API, and webhook reference documentation must be made internally. I have copied your issue to an internal issue, so I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team
Projects
None yet
Development

No branches or pull requests

3 participants