ci: add GitHub token permissions for workflows by varunsh-coder · Pull Request #47652 · pandas-dev/pandas (original) (raw)

If we set Read repository contents permission in our repository settings, would we then only need to specify the write permissions when needed?

Hi @mroeschke yes, that is true. At the same time, it is a best practice to set the permissions in the workflow files explicitly.

So, setting Read repository contents permission in the repo setting is a good idea as future workflows in the repo will be secure-by-default. In addition, I would also recommend setting permissions explicitly in the workflow files.