Determine permissions for GITHUB_TOKEN

I’m trying to figure out whether a default GITHUB_TOKEN (used for github-actions[bot]) in a workflow has read and write permissions or only read permissions (i.e. for forked repos). Is there any way of getting this information? e.g. through some API call?

Hi! You could trigger the workflow run and then expand the Set up job step to see what permissions the token has.

For example:

1 Like

Would there be a way to get this information programmatically?