You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This trigger is very powerful, i.e., pull_request_target can have access write permission to the repo, also access to the secrets. Although the these secrets are stored in runner memory, but there are some findings that the secrets could be leaked with the following factors:
1.1 we checkout the code from the forked repo, meaning, the actor, if they are willing to, can embed malicious code / package. (
I created a dummy PR from my forked repo: #16
Some issues I discovered and I think they can be improved:
security issue
sdk/.github/workflows/external-pr.yaml
Line 4 in 85c4de8
This trigger is very powerful, i.e.,
pull_request_target
can have access write permission to the repo, also access to the secrets. Although the these secrets are stored in runner memory, but there are some findings that the secrets could be leaked with the following factors:1.1 we checkout the code from the forked repo, meaning, the actor, if they are willing to, can embed malicious code / package. (
sdk/.github/workflows/external-pr.yaml
Line 18 in 85c4de8
1.2
npm install
seems innocent, but the bad package can be slipped into the PR if we (code reviewer) didn't pay 200% attentionthe dummy PR triggered the internal workflow too which is not ideal, https://github.com/storyprotocol/sdk/actions/runs/7494857454/job/20403690431#step:7:38
the above job failed anyway since it does not have access to the secret (a PR from a forked repo)
I am thinking to do a bit optimization, and the following goals are expected reached:
REF
[1] https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
[2] https://securitylab.github.com/research/github-actions-untrusted-input/
[3] https://securitylab.github.com/research/github-actions-building-blocks/
The text was updated successfully, but these errors were encountered: