olmps / memo

Memo is an open-source, programming-oriented spaced repetition software (SRS) written in Flutter.
BSD 3-Clause "New" or "Revised" License
1.82k stars 158 forks source link

Forked PRs doesn't have access to Github Secrets #154

Closed ggirotto closed 3 years ago

ggirotto commented 3 years ago

Github Secrets are not accessible from pull-request workflow in forked repos. This is security protection and an expected behavior, but causes that forked PRs cannot run pull-request workflow.

References:

As proposed by reference number 2, pull_request_target may be used to allow access to Github Secrets from forked PRs.

This issue is still in development/study

ggirotto commented 3 years ago

Workflows triggered via pull_request_target have write permission to the target repository. They also have access to target repository secrets. The same is true for workflows triggered on pull_request from a branch in the same repository, but not from external forks. The reasoning behind the latter is that it is safe to share the repository secrets if the user creating the PR has write permission to the target repository already.