Closed lugi0 closed 2 years ago
Hi, I think the problem is generally the GITHUB_TOKEN
. It only gives read
permission for the token when it's used from fork. You can see the permissions from here: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token.
I think you're right! I hadn't seen this page, but I read Maximum access by forked repos
, and I guess that means there's no way to force the token to have write permissions as well :/ I'll try to set up a personal access token, thanks!
Yeah, unfortunately you can't give the token from fork other than read
permissions.
Finally got it to work, had to use this as a base for my solution: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
Hello!
I'm trying to implement a workflow that uses this action, and it works wonderfully when I open a PR from a branch created directly on my main repo.
However, when a PR is coming from a fork, the action lacks the required permissions to leave the comment. I try to specifically grant the token in my .yaml
write-all
permissions, and all settings I could find in the main repo should allow actions to have write permissions as well.Has anyone faced a similar issue? Am I doing something wrong? This is the yaml for reference:
And this is the error I get: